Skip to content

Commit edd0016

Browse files
authored
Integration test for workers and translation. (#72)
Currently we don't validate in the integration tests if the changes done to worker images will be compatible with the translation step. This PR adds validation to the debian worker images by running the translation using the latest version of these worker images (built on the fly).
1 parent 5a7af92 commit edd0016

File tree

3 files changed

+104
-6
lines changed

3 files changed

+104
-6
lines changed

daisy_integration_tests/debian_10_worker.wf.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828
}
2929
}
3030
},
31+
"translate-disk": {
32+
"Timeout": "120m",
33+
"IncludeWorkflow": {
34+
"Path": "./debian_worker.subwf.json",
35+
"Vars": {
36+
"worker_image": "${image_prefix}-v${build_tag}"
37+
}
38+
}
39+
},
3140
"delete-image": {
3241
"DeleteResources": {
3342
"Images": [
@@ -37,8 +46,7 @@
3746
}
3847
},
3948
"Dependencies": {
40-
"delete-image": [
41-
"build-debian-worker"
42-
]
49+
"translate-disk": ["build-debian-worker"],
50+
"delete-image": ["translate-disk"]
4351
}
4452
}

daisy_integration_tests/debian_11_worker.wf.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828
}
2929
}
3030
},
31+
"translate-disk": {
32+
"Timeout": "120m",
33+
"IncludeWorkflow": {
34+
"Path": "./debian_worker.subwf.json",
35+
"Vars": {
36+
"worker_image": "${image_prefix}-v${build_tag}"
37+
}
38+
}
39+
},
3140
"delete-image": {
3241
"DeleteResources": {
3342
"Images": [
@@ -37,8 +46,7 @@
3746
}
3847
},
3948
"Dependencies": {
40-
"delete-image": [
41-
"build-debian-worker"
42-
]
49+
"translate-disk": ["build-debian-worker"],
50+
"delete-image": ["translate-disk"]
4351
}
4452
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"Name": "debian-worker",
3+
"Vars": {
4+
"input_el_image": {
5+
"Value": "projects/compute-image-import-test/global/images/rhel-8-2",
6+
"Description": "The enterprise Linux image to use as input for the translation."
7+
},
8+
"el_major_version": {
9+
"Value": "8",
10+
"Description": "The major version of the enterprise Linux installed on the image. It will be used to select the translation workflow."
11+
},
12+
"worker_image": {
13+
"Required": true,
14+
"Description": "The image to use as a source for a worker VM."
15+
}
16+
},
17+
"Sources": {
18+
"post_translate_test.sh": "./scripts/post_translate_test.sh"
19+
},
20+
"Steps": {
21+
"create-disks": {
22+
"CreateDisks": [
23+
{
24+
"name": "worker-disk",
25+
"sourceImage": "${worker_image}",
26+
"type": "pd-ssd"
27+
},
28+
{
29+
"name": "input-disk",
30+
"sourceImage": "${input_el_image}",
31+
"type": "pd-ssd"
32+
}
33+
]
34+
},
35+
"translate-disk": {
36+
"Timeout": "60m",
37+
"IncludeWorkflow": {
38+
"Path": "../daisy_workflows/image_import/enterprise_linux/translate_el.wf.json",
39+
"Vars": {
40+
"el_release": "${el_major_version}",
41+
"install_gce_packages": "true",
42+
"translator_disk": "worker-disk",
43+
"imported_disk": "input-disk",
44+
"use_rhel_gce_license": "true"
45+
}
46+
}
47+
},
48+
"create-test-instance": {
49+
"CreateInstances": [
50+
{
51+
"name": "test-inst",
52+
"disks": [
53+
{
54+
"source": "input-disk"
55+
}
56+
],
57+
"machineType": "n1-standard-4",
58+
"StartupScript": "post_translate_test.sh"
59+
}
60+
]
61+
},
62+
"wait-for-test-instance": {
63+
"Timeout": "30m",
64+
"WaitForInstancesSignal": [
65+
{
66+
"Name": "test-inst",
67+
"SerialOutput": {
68+
"Port": 1,
69+
"SuccessMatch": "PASSED:",
70+
"FailureMatch": "FAILED:",
71+
"StatusMatch": "STATUS:"
72+
}
73+
}
74+
]
75+
}
76+
},
77+
"Dependencies": {
78+
"translate-disk": ["create-disks"],
79+
"create-test-instance": ["translate-disk"],
80+
"wait-for-test-instance": ["create-test-instance"]
81+
}
82+
}

0 commit comments

Comments
 (0)