test/cases: rename json sections
Rename to fit more closely with their use before we add too many more of these. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
6c44d231ee
commit
cc04f92997
16 changed files with 20 additions and 20 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"boot-test": {
|
||||
"boot": {
|
||||
"type": "qemu-extract"
|
||||
},
|
||||
"compose": {
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"image-info": {
|
||||
"boot-environment": {
|
||||
"GRUB2_BOOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
"GRUB2_ROOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"image-info": {
|
||||
"boot-environment": {
|
||||
"GRUB2_BOOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
"GRUB2_ROOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"boot-test": {
|
||||
"boot": {
|
||||
"type": "nspawn"
|
||||
},
|
||||
"compose": {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"image-info": {
|
||||
"boot-environment": {
|
||||
"GRUB2_BOOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
"GRUB2_ROOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"boot-test": {
|
||||
"boot": {
|
||||
"type": "nspawn"
|
||||
},
|
||||
"compose": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"url": "https://download.fedoraproject.org/pub/fedora/linux/releases/30/Cloud/x86_64/images/Fedora-Cloud-Base-30-1.2.x86_64.qcow2",
|
||||
"expected": {
|
||||
"image-info": {
|
||||
"bootloader": "grub",
|
||||
"bootmenu": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"image-info": {
|
||||
"boot-environment": {
|
||||
"GRUB2_BOOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
"GRUB2_ROOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"boot-test": {
|
||||
"boot": {
|
||||
"type": "qemu"
|
||||
},
|
||||
"compose": {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"image-info": {
|
||||
"boot-environment": {
|
||||
"GRUB2_BOOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
"GRUB2_ROOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"boot-test": {
|
||||
"boot": {
|
||||
"type": "qemu"
|
||||
},
|
||||
"compose": {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"boot-test": {
|
||||
"boot": {
|
||||
"type": "nspawn-extract"
|
||||
},
|
||||
"compose": {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"image-info": {
|
||||
"boot-environment": {
|
||||
"GRUB2_BOOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
"GRUB2_ROOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"boot-test": {
|
||||
"boot": {
|
||||
"type": "qemu"
|
||||
},
|
||||
"compose": {
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"expected": {
|
||||
"image-info": {
|
||||
"boot-environment": {
|
||||
"GRUB2_BOOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
"GRUB2_ROOT_FS_UUID": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"boot-test": {
|
||||
"boot": {
|
||||
"type": "qemu"
|
||||
},
|
||||
"compose": {
|
||||
|
|
|
|||
8
test/run
8
test/run
|
|
@ -188,8 +188,8 @@ def run_test(case, store):
|
|||
subprocess.run(["xz", "--decompress", "--stdout", filename], stdout=f)
|
||||
filename = fn
|
||||
info = json.loads(subprocess.check_output(["tools/image-info", filename]))
|
||||
if info != case["expected"]:
|
||||
with temporary_json_file(case["expected"]) as a, temporary_json_file(info) as b:
|
||||
if info != case["image-info"]:
|
||||
with temporary_json_file(case["image-info"]) as a, temporary_json_file(info) as b:
|
||||
subprocess.run(["diff", "--unified", "--color", "--label", "expected", a, "--label", "got", b], check=False)
|
||||
return False
|
||||
except KeyError:
|
||||
|
|
@ -202,11 +202,11 @@ def get_local_boot_test_case(fname: str) -> Union[Tuple[str, str, Dict[Any, Any]
|
|||
with open(fname, "r") as fd:
|
||||
test_case_dict = json.load(fd)
|
||||
|
||||
if "boot-test" not in test_case_dict:
|
||||
if "boot" not in test_case_dict:
|
||||
return None
|
||||
|
||||
pipeline_dict = test_case_dict["pipeline"]
|
||||
return test_case_dict["boot-test"]["type"], test_case_dict["compose"]["filename"], pipeline_dict
|
||||
return test_case_dict["boot"]["type"], test_case_dict["compose"]["filename"], pipeline_dict
|
||||
|
||||
|
||||
def run_ssh_test(private_key):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue