tests: move llb tests into tests/llb

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-03-31 18:49:53 -07:00
parent e0afc6304d
commit 93296fa358
62 changed files with 59 additions and 71 deletions

View File

@@ -0,0 +1,20 @@
package testing
hello: "world"
bar: string
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo \(hello)
echo "This test SHOULD fail, because this script SHOULD execute, since bar is not referenced"
exit 1
"""]
},
]

View File

@@ -0,0 +1,20 @@
package testing
hello: "world"
bar: string
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo \(bar)
echo "This test SHOULD succeed, because this is never going to be executed, as \(bar) is not concrete"
exit 1
"""]
},
]

View File

@@ -0,0 +1 @@
module: "dagger.io/testing"

View File

@@ -0,0 +1,17 @@
package def
#dang: string
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]

View File

@@ -0,0 +1,12 @@
package testing
import (
"dagger.io/def"
)
#compute: [
{
do: "load",
from: def
},
]

View File

@@ -0,0 +1 @@
module: "dagger.io/testing"

View File

@@ -0,0 +1,18 @@
package nonoptional
dang: string
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo "This test SHOULD fail, because this SHOULD be executed"
exit 1
"""]
},
]

View File

@@ -0,0 +1,12 @@
package testing
import (
"dagger.io/nonoptional"
)
#compute: [
{
do: "load",
from: nonoptional
},
]

View File

@@ -0,0 +1 @@
module: "dagger.io/testing"

View File

@@ -0,0 +1,17 @@
package optional
dang?: string
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]

View File

@@ -0,0 +1,12 @@
package testing
import (
"dagger.io/optional"
)
#compute: [
{
do: "load",
from: optional
},
]