Adding tests
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
This commit is contained in:
5
examples/tests/compute/invalid/bool/main.cue
Normal file
5
examples/tests/compute/invalid/bool/main.cue
Normal file
@@ -0,0 +1,5 @@
|
||||
package testing
|
||||
|
||||
#dagger: {
|
||||
compute: true
|
||||
}
|
5
examples/tests/compute/invalid/int/main.cue
Normal file
5
examples/tests/compute/invalid/int/main.cue
Normal file
@@ -0,0 +1,5 @@
|
||||
package testing
|
||||
|
||||
#dagger: {
|
||||
compute: 123
|
||||
}
|
5
examples/tests/compute/invalid/string/main.cue
Normal file
5
examples/tests/compute/invalid/string/main.cue
Normal file
@@ -0,0 +1,5 @@
|
||||
package testing
|
||||
|
||||
#dagger: {
|
||||
compute: "whatever"
|
||||
}
|
7
examples/tests/compute/invalid/struct/main.cue
Normal file
7
examples/tests/compute/invalid/struct/main.cue
Normal file
@@ -0,0 +1,7 @@
|
||||
package testing
|
||||
|
||||
#dagger: {
|
||||
compute: {
|
||||
whatever: "wrong"
|
||||
}
|
||||
}
|
18
examples/tests/compute/invalid/undefined_prop/main.cue
Normal file
18
examples/tests/compute/invalid/undefined_prop/main.cue
Normal file
@@ -0,0 +1,18 @@
|
||||
package testing
|
||||
|
||||
bar: string
|
||||
|
||||
#dagger: {
|
||||
compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
dir: "/"
|
||||
args: ["sh", "-c", "echo \(foo.bar)"]
|
||||
}
|
||||
]
|
||||
foo: bar: bar
|
||||
}
|
19
examples/tests/compute/noop/main.cue
Normal file
19
examples/tests/compute/noop/main.cue
Normal file
@@ -0,0 +1,19 @@
|
||||
package testing
|
||||
|
||||
// no-op, should not error
|
||||
realempty: {
|
||||
#dagger: {}
|
||||
}
|
||||
|
||||
// no-op, should not error
|
||||
empty: {
|
||||
#dagger: compute: []
|
||||
}
|
||||
|
||||
// additional prop, should not error
|
||||
withprops: {
|
||||
#dagger: {
|
||||
compute: []
|
||||
foo: bar: "foo"
|
||||
}
|
||||
}
|
15
examples/tests/compute/simple/main.cue
Normal file
15
examples/tests/compute/simple/main.cue
Normal file
@@ -0,0 +1,15 @@
|
||||
package testing
|
||||
|
||||
#dagger: {
|
||||
compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
args: ["true"]
|
||||
dir: "/"
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user