-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add basic test suite for the run action
Signed-off-by: Christopher Obbard <[email protected]>
- Loading branch information
Showing
6 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
broken.sh |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
echo "test from script; arguments: $@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
architecture: amd64 | ||
|
||
actions: | ||
- action: debootstrap | ||
suite: bullseye | ||
variant: minbase | ||
merged-usr: true | ||
|
||
- action: run | ||
description: Run a script which is a symlink | ||
script: scripts/test-symlink.sh argument1 argument2 | ||
|
||
- action: run | ||
description: Run a script with arguments | ||
script: scripts/test.sh argument1 argument2 | ||
|
||
- action: run | ||
description: Run a script without arguments | ||
script: scripts/test.sh | ||
|
||
- action: run | ||
description: Run a script with arguments in a chroot | ||
chroot: true | ||
script: scripts/test.sh argument1 argument2 | ||
|
||
- action: run | ||
description: Run a script without arguments in chroot | ||
chroot: true | ||
script: scripts/test.sh | ||
|
||
- action: run | ||
description: Test running a command | ||
command: echo test | ||
|
||
# TODO: This should fail in the Verify stage, we cannot yet check that in CI | ||
#- action: run | ||
# description: Run a script which has a broken symlink | ||
# chroot: true | ||
# script: scripts/test-broken-symlink.sh | ||
|
||
# TODO: This should fail in the Verify stage, we cannot yet check that in CI | ||
#- action: run | ||
# description: Run a script which has no exec bit set | ||
# chroot: true | ||
# script: scripts/test-broken-symlink.sh |