Adding tests
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
This commit is contained in:
48
examples/tests/fetch-container/exist/main.cue
Normal file
48
examples/tests/fetch-container/exist/main.cue
Normal file
@@ -0,0 +1,48 @@
|
||||
package testing
|
||||
|
||||
// XXX https://github.com/blocklayerhq/dagger/issues/10 requires that #dagger are nested under https://github.com/blocklayerhq/dagger/issues/21 makes this very hard to verify
|
||||
|
||||
busybox1: {
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "busybox"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
busybox2: {
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "busybox:latest"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
busybox3: {
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "busybox:1.33-musl"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
busybox4: {
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "busyboxa@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
busybox5: {
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "busybox:1.33-musl@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
|
||||
},
|
||||
]
|
||||
}
|
7
examples/tests/fetch-container/invalid/main.cue
Normal file
7
examples/tests/fetch-container/invalid/main.cue
Normal file
@@ -0,0 +1,7 @@
|
||||
package testing
|
||||
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
},
|
||||
]
|
@@ -0,0 +1,8 @@
|
||||
package testing
|
||||
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "alpine@sha256:c6c7524e2111f22a9f7577211232d89a9e68cf5b9ed4a41ba77957c9771380a5"
|
||||
}
|
||||
]
|
@@ -0,0 +1,10 @@
|
||||
package testing
|
||||
|
||||
// XXX WATCHOUT
|
||||
// Once buildkit has pulled that digest, it will stay cached and happily succeed WHATEVER the image name then is
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "busyboxaaa@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
|
||||
},
|
||||
]
|
@@ -0,0 +1,8 @@
|
||||
package testing
|
||||
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "doesnotexist"
|
||||
}
|
||||
]
|
8
examples/tests/fetch-container/nonexistent/tag/main.cue
Normal file
8
examples/tests/fetch-container/nonexistent/tag/main.cue
Normal file
@@ -0,0 +1,8 @@
|
||||
package testing
|
||||
|
||||
#dagger: compute: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
ref: "alpine:doesnotexist"
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user