tests: split integration tests

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-04-01 18:46:08 -07:00
parent 896d303f4a
commit b229119a3d
16 changed files with 394 additions and 345 deletions

View File

@@ -0,0 +1,41 @@
package test
import (
"dagger.io/alpine"
"dagger.io/dagger"
"dagger.io/llb"
)
TestData: dagger.#Artifact
_expected: """
/src/b.txt
/src/foo:
bar.txt
"""
TestIgnore: {
string
#compute: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
args: ["sh", "-c", "ls /src/* > /out.txt"]
mount: "/src": from: TestData
},
llb.#Export & {source: "/out.txt"},
llb.#Exec & {
args: [
"sh",
"-ec",
"""
cat > /test.txt << EOF
\(_expected)
EOF
test "$(cat /out.txt)" = "$(cat /test.txt)"
""",
]
},
]
}

View File

@@ -0,0 +1,2 @@
a.txt
*/*.json

0
tests/compute/ignore/testdata/a.txt vendored Normal file
View File

0
tests/compute/ignore/testdata/b.txt vendored Normal file
View File

View File

View File