From 40096e189bda625f53c77c21c941415df17024bb Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 13 Jan 2020 14:03:27 +0100 Subject: [PATCH] test: new test to check zipl stage The zipl stage is a fairly simple stage that just creates a file in /etc called zipl.conf with a single configurable option, which is called `timeout`. Check the file gets properly created with the desired hash and verify that setting the timeout works. --- test/stages_tests/zipl/a.json | 29 +++++++++++++++++++++++++++++ test/stages_tests/zipl/b.json | 31 +++++++++++++++++++++++++++++++ test/stages_tests/zipl/diff.json | 12 ++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 test/stages_tests/zipl/a.json create mode 100644 test/stages_tests/zipl/b.json create mode 100644 test/stages_tests/zipl/diff.json diff --git a/test/stages_tests/zipl/a.json b/test/stages_tests/zipl/a.json new file mode 100644 index 00000000..4ef3fa30 --- /dev/null +++ b/test/stages_tests/zipl/a.json @@ -0,0 +1,29 @@ +{ + "build": { + "pipeline": { + "stages": [ + { + "name": "org.osbuild.dnf", + "options": { + "releasever": "30", + "basearch": "x86_64", + "install_weak_deps": false, + "repos": [ + "sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97" + ], + "packages": [ + "dnf" + ] + } + } + ] + }, + "runner": "org.osbuild.fedora30" + }, + "stages": [ + { + "name": "org.osbuild.zipl", + "options": {} + } + ] +} diff --git a/test/stages_tests/zipl/b.json b/test/stages_tests/zipl/b.json new file mode 100644 index 00000000..ffa33239 --- /dev/null +++ b/test/stages_tests/zipl/b.json @@ -0,0 +1,31 @@ +{ + "build": { + "pipeline": { + "stages": [ + { + "name": "org.osbuild.dnf", + "options": { + "releasever": "30", + "basearch": "x86_64", + "install_weak_deps": false, + "repos": [ + "sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97" + ], + "packages": [ + "dnf" + ] + } + } + ] + }, + "runner": "org.osbuild.fedora30" + }, + "stages": [ + { + "name": "org.osbuild.zipl", + "options": { + "timeout": 1 + } + } + ] +} diff --git a/test/stages_tests/zipl/diff.json b/test/stages_tests/zipl/diff.json new file mode 100644 index 00000000..3fa4539b --- /dev/null +++ b/test/stages_tests/zipl/diff.json @@ -0,0 +1,12 @@ +{ + "added_files": [], + "deleted_files": [], + "differences": { + "/etc/zipl.conf": { + "content": [ + "sha256:516d31e6606c4bc28dfe9f6e3cf6c438f8be22781b7132f6a4b2ea0b3735ab42", + "sha256:156c06c8cac3adedea18063ea5a391851f5bc603695cf0cb8c982d3ad857ad6d" + ] + } + } +}