Skip to content

Commit

Permalink
Fix the typo
Browse files Browse the repository at this point in the history
  • Loading branch information
yoguo committed Nov 21, 2024
1 parent 7fda7b6 commit 56921f7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions os_tests/tests/test_image_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ def test_create_bootc_disk_image(self):
self.log.info('unregister rhsm to aviod bug when creating iso disk, please register again after this case if you need.')
cmd = "sudo cp /etc/yum.repos.d/dnf.repo ./{}/dnf.repo".format(image_mode_dir)
utils_lib.run_cmd(self, cmd, expect_ret=0, msg="Create dnf.repo for packages installation in building custom image")
cmd = "cd {} && sudo sed -i '3iRUN dnf install -y {} && dnf clean all' Containerfile && sudo cat Containerfile".format(image_mode_dir, pkgs)
utils_lib.run_cmd(self, cmd, expect_ret=0, msg="Add installed pkgs to Containerfile.")

if pkgs:
cmd = "cd {} && sudo sed -i '3iRUN dnf install -y {} && dnf clean all' Containerfile && sudo cat Containerfile".format(image_mode_dir, pkgs)
utils_lib.run_cmd(self, cmd, expect_ret=0, msg="Add installed pkgs to Containerfile.")

#login container repo
quay_io_data = self.params.get('quay_io_data')
bootc_io_data = self.params.get('bootc_io_data')
Expand Down Expand Up @@ -204,7 +205,7 @@ def test_create_bootc_disk_image(self):

#Create bootable disks with custom bootc images
bootc_image_builder = self.params.get('bootc_image_builder')
if not bootc_base_image:
if not bootc_image_builder:
if 'rhel' in bootc_base_image:
bootc_image_builder = bootc_base_image.replace('rhel-bootc','bootc-image-builder')
else:
Expand Down

0 comments on commit 56921f7

Please sign in to comment.