tests: split integration tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
41
tests/compute/ignore/main.cue
Normal file
41
tests/compute/ignore/main.cue
Normal 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)"
|
||||
""",
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
2
tests/compute/ignore/testdata/.daggerignore
vendored
Normal file
2
tests/compute/ignore/testdata/.daggerignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
a.txt
|
||||
*/*.json
|
0
tests/compute/ignore/testdata/a.txt
vendored
Normal file
0
tests/compute/ignore/testdata/a.txt
vendored
Normal file
0
tests/compute/ignore/testdata/b.txt
vendored
Normal file
0
tests/compute/ignore/testdata/b.txt
vendored
Normal file
0
tests/compute/ignore/testdata/foo/bar.txt
vendored
Normal file
0
tests/compute/ignore/testdata/foo/bar.txt
vendored
Normal file
0
tests/compute/ignore/testdata/foo/cow.json
vendored
Normal file
0
tests/compute/ignore/testdata/foo/cow.json
vendored
Normal file
Reference in New Issue
Block a user