From d08d5d1cfb8deb4fb57110ede0dc4d3f69dcd8fd Mon Sep 17 00:00:00 2001 From: Christopher Obbard Date: Wed, 5 Jul 2023 12:02:08 +0100 Subject: [PATCH] Add test to overlay into a non-existent destination Attempt to overlay a file into a directory in the filesystem which doesn't exist. The expected behavior is to cause an error. This test is currently a manual test case and is not hooked into the CI. Signed-off-by: Christopher Obbard --- .../overlay-non-existent-destination.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/overlay-non-existent-destination/overlay-non-existent-destination.yaml diff --git a/tests/overlay-non-existent-destination/overlay-non-existent-destination.yaml b/tests/overlay-non-existent-destination/overlay-non-existent-destination.yaml new file mode 100644 index 0000000..473a42d --- /dev/null +++ b/tests/overlay-non-existent-destination/overlay-non-existent-destination.yaml @@ -0,0 +1,17 @@ +architecture: amd64 + +actions: + # This overlay action is expected to error out here because the destination + # doesn't exist in the filesystem. + - action: overlay + description: Overlay file into a non-existent destination + source: overlay-non-existent-destination.yaml + destination: /this/path/does/not/exist/overlay-non-existent-destination.yaml + + - action: run + description: Check if path exists + command: "[ -e /this/path/does/not/exist/overlay-non-existent-destination.yaml ] || exit 1" + + - action: run + postprocess: true + command: echo Test