Adding tests
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
This commit is contained in:
13
examples/tests/exec/dir/doesnotexist/main.cue
Normal file
13
examples/tests/exec/dir/doesnotexist/main.cue
Normal file
@@ -0,0 +1,13 @@
|
||||
package testing
|
||||
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
args: ["sh", "-c", "echo should not succeed"]
|
||||
dir: "/thisisnonexistent"
|
||||
},
|
||||
]
|
16
examples/tests/exec/dir/exist/main.cue
Normal file
16
examples/tests/exec/dir/exist/main.cue
Normal file
@@ -0,0 +1,16 @@
|
||||
package testing
|
||||
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
args: ["sh", "-c", """
|
||||
echo "pwd is: $(pwd)"
|
||||
[ "$(pwd)" == "/etc" ] || exit 1
|
||||
"""]
|
||||
dir: "/etc"
|
||||
},
|
||||
]
|
Reference in New Issue
Block a user