MOAR TESTS
- tests for load - fixed a few typos in “copy” tests - provisional tests for mount - adding a “concurrency” test Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
This commit is contained in:
37
examples/tests/load/invalid/cache/main.cue
vendored
Normal file
37
examples/tests/load/invalid/cache/main.cue
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
package testing
|
||||
|
||||
test1: {
|
||||
string
|
||||
|
||||
#dagger: {
|
||||
compute: [
|
||||
{
|
||||
do: "load"
|
||||
from: [{do: "fetch-container", ref: "alpine"}]
|
||||
},
|
||||
{
|
||||
do: "export"
|
||||
source: "/etc/issue"
|
||||
format: "string"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
test2: {
|
||||
string
|
||||
|
||||
#dagger: {
|
||||
compute: [
|
||||
{
|
||||
do: "load"
|
||||
from: [{do: "fetch-container", ref: "busybox"}]
|
||||
},
|
||||
{
|
||||
do: "export"
|
||||
source: "/etc/issue"
|
||||
format: "string"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
57
examples/tests/load/valid/component/main.cue
Normal file
57
examples/tests/load/valid/component/main.cue
Normal file
@@ -0,0 +1,57 @@
|
||||
package testing
|
||||
|
||||
component: #dagger: compute: [{
|
||||
do: "fetch-container"
|
||||
ref: "alpine"
|
||||
}, {
|
||||
do: "exec"
|
||||
args: ["sh", "-c", """
|
||||
printf lol > /id
|
||||
"""]
|
||||
dir: "/"
|
||||
}]
|
||||
|
||||
test1: {
|
||||
string
|
||||
|
||||
#dagger: {
|
||||
compute: [
|
||||
{
|
||||
do: "load"
|
||||
from: component
|
||||
},
|
||||
{
|
||||
do: "export"
|
||||
source: "/id"
|
||||
format: "string"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
test2: {
|
||||
string
|
||||
|
||||
#dagger: {
|
||||
compute: [
|
||||
{
|
||||
do: "load"
|
||||
from: #dagger: compute: [{
|
||||
do: "fetch-container"
|
||||
ref: "alpine"
|
||||
}, {
|
||||
do: "exec"
|
||||
args: ["sh", "-c", """
|
||||
printf lol > /id
|
||||
"""]
|
||||
dir: "/"
|
||||
}]
|
||||
},
|
||||
{
|
||||
do: "export"
|
||||
source: "/id"
|
||||
format: "string"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
20
examples/tests/load/valid/script/main.cue
Normal file
20
examples/tests/load/valid/script/main.cue
Normal file
@@ -0,0 +1,20 @@
|
||||
package testing
|
||||
|
||||
|
||||
test: {
|
||||
string
|
||||
|
||||
#dagger: {
|
||||
compute: [
|
||||
{
|
||||
do: "load"
|
||||
from: [{do: "fetch-container", ref: "alpine"}]
|
||||
},
|
||||
{
|
||||
do: "export"
|
||||
source: "/etc/issue"
|
||||
format: "string"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user