|
15 | 15 | LOCAL_REPO_PATH = POI_TEST_PATH + "/repo" |
16 | 16 |
|
17 | 17 | BASE_COMMAND = f"{POI_PATH}/create-image-util --poi-path {POI_PATH} --local-repo-path" |
18 | | -IMAGE_FLAVOR = ["azure", "ova", "rpi", "ami"] |
| 18 | +IMAGE_FLAVOR = ["azure", "ova", "rpi", "ami", "iso"] |
19 | 19 |
|
20 | 20 |
|
21 | 21 | def create_repo_path(): |
22 | 22 | os.makedirs(LOCAL_REPO_PATH, exist_ok=True) |
23 | 23 |
|
24 | 24 |
|
25 | 25 | def remove_build_images(directory): |
26 | | - patterns = ["*.vhd.tar.gz", "*.ova", "*.ovf", "*.mf", "*.raw", "*.img", "poi-manifest.json"] |
| 26 | + patterns = ["*.vhd.tar.gz", "*.ova", "*.ovf", "*.mf", "*.raw", "*.img"," *.iso", "poi-manifest.json"] |
27 | 27 |
|
28 | 28 | files = [file for pattern in patterns for file in glob.glob(f"{directory}/{pattern}")] |
29 | 29 | for file in files: |
@@ -93,6 +93,11 @@ def test_build_ph5_local_ami_image(self): |
93 | 93 | subprocess.check_call(exec_command, shell = True) |
94 | 94 | assert(image_exist("ami", "photon-ami.raw") == True) |
95 | 95 |
|
| 96 | + def test_build_ph5_local_iso_image(self): |
| 97 | + exec_command = f"{BASE_COMMAND} {LOCAL_REPO_PATH}/5.0 --config-file packages_minimal.json --flavor iso" |
| 98 | + |
| 99 | + subprocess.check_call(exec_command, shell = True) |
| 100 | + assert(image_exist("iso", "something.iso") == True) |
96 | 101 | ''' |
97 | 102 | def test_build_ph5_local_rpi_image(self): |
98 | 103 | exec_command = f"{BASE_COMMAND} {LOCAL_REPO_PATH}/5.0 --config-file rpi_ks.yaml --flavor rpi --arch aarch64" |
@@ -138,9 +143,15 @@ def test_build_ph4_local_lvm_ova_image(self): |
138 | 143 |
|
139 | 144 | def test_build_ph4_local_ami_image(self): |
140 | 145 | exec_command = f"{BASE_COMMAND} {LOCAL_REPO_PATH}/4.0 --config-file ami_40_ks.yaml --flavor ami --releasever 4.0" |
| 146 | + |
141 | 147 | subprocess.check_call(exec_command, shell = True) |
142 | 148 | assert(image_exist("ami", "photon-ami-4.0.raw") == True) |
143 | 149 |
|
| 150 | + def test_build_ph4_local_iso_image(self): |
| 151 | + exec_command = f"{BASE_COMMAND} {LOCAL_REPO_PATH}/4.0 --config-file packages_minimal.json --flavor iso --releasever 4.0" |
| 152 | + |
| 153 | + subprocess.check_call(exec_command, shell = True) |
| 154 | + assert(image_exist("iso", "something.iso") == True) |
144 | 155 | ''' |
145 | 156 | def test_build_ph4_local_rpi_image(self): |
146 | 157 | exec_command = f"{BASE_COMMAND} {LOCAL_REPO_PATH}/4.0 --config-file rpi_ks.yaml --flavor rpi --arch aarch64 --releasever 4.0" |
|
0 commit comments