Merge pull request #693 from samalba/test-input-dir-ignore

test: added test for ignoring .dagger directory in input dir
This commit is contained in:
Andrea Luzzardi 2021-06-21 17:40:28 +02:00 committed by GitHub
commit 8ccda8de0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 0 deletions

View File

@ -308,6 +308,20 @@ setup() {
}' }'
} }
@test "dagger input dir: ignore .dagger" {
"$DAGGER" init
dagger_new_with_plan input "$TESTDIR"/cli/input/ignore
run [ -d "$TESTDIR"/cli/input/ignore/testdata/.dagger ]
assert_success
cp -R "$TESTDIR"/cli/input/ignore/testdata/ "$DAGGER_WORKSPACE"/testdata
"$DAGGER" input -e "input" dir "source" "$DAGGER_WORKSPACE"/testdata
"$DAGGER" up -e "input"
assert_success
}
@test "dagger input git" { @test "dagger input git" {
"$DAGGER" init "$DAGGER" init

View File

@ -0,0 +1,20 @@
package testing
import (
"dagger.io/dagger/op"
"dagger.io/dagger"
)
source: dagger.#Artifact
#up: [
op.#FetchContainer & {ref: "busybox"},
op.#Exec & {
args: ["sh", "-c", """
set -exu
[ -f /source/testfile ]
[ ! -d /source/.dagger ]
"""]
mount: "/source": from: source
},
]

View File

View File

@ -0,0 +1 @@
thisisatest