fixed tests

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-04-02 17:16:57 -07:00
parent a799dd05d7
commit 21e0ac21de
2 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@ foo: "bar"
bar: { bar: {
string string
#compute: [ #up: [
llb.#FetchContainer & {ref: "busybox"}, llb.#FetchContainer & {ref: "busybox"},
llb.#Exec & { llb.#Exec & {
args: ["cp", "/source/testfile", "/out"] args: ["cp", "/source/testfile", "/out"]

View File

@ -65,17 +65,17 @@ test::cli::newgit() {
DAGGER_STORE="$(mktemp -d -t dagger-store-XXXXXX)" DAGGER_STORE="$(mktemp -d -t dagger-store-XXXXXX)"
export DAGGER_STORE export DAGGER_STORE
test::one "CLI: new: --plan-git" \ test::one "CLI: new git: --plan-git" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" new --plan-git https://github.com/samalba/dagger-test.git simple "$dagger" "${DAGGER_BINARY_ARGS[@]}" new --plan-git https://github.com/samalba/dagger-test.git simple
test::one "CLI: new: verify plan can be upped" \ test::one "CLI: new git: verify plan can be upped" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "simple" "$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "simple"
test::one "CLI: new: verify we have the right plan" --stdout='{ test::one "CLI: new git: verify we have the right plan" --stdout='{
foo: "value" foo: "value"
bar: "another value" bar: "another value"
}' \ }' \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -d "simple" -c "$dagger" "${DAGGER_BINARY_ARGS[@]}" query -f cue -d "simple" -c
} }
test::cli::query() { test::cli::query() {
@ -129,7 +129,7 @@ test::cli::plan() {
foo: "value" foo: "value"
bar: "another value" bar: "another value"
}' \ }' \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -d "simple" -c "$dagger" "${DAGGER_BINARY_ARGS[@]}" query -f cue -d "simple" -c
} }
test::cli::input() { test::cli::input() {
@ -146,13 +146,13 @@ test::cli::input() {
test::one "CLI: up: missing input" \ test::one "CLI: up: missing input" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input" --stdout='{"foo":"bar"}' "$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input" --stdout='{"foo":"bar"}'
test::one "CLI: plan dir" \ test::one "CLI: input dir" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" input -d "input" dir "source" ./tests/cli/input/testdata "$dagger" "${DAGGER_BINARY_ARGS[@]}" input -d "input" dir "source" ./tests/cli/input/testdata
test::one "CLI: up: input is set with input dir" \ test::one "CLI: up: input is set with input dir" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input" --stdout='{"bar":"thisisatest\n","foo":"bar","source":{}}' "$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input" --stdout='{"bar":"thisisatest\n","foo":"bar","source":{}}'
test::one "CLI: plan dir" \ test::one "CLI: input git" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" input -d "input" git "source" https://github.com/samalba/dagger-test-simple.git "$dagger" "${DAGGER_BINARY_ARGS[@]}" input -d "input" git "source" https://github.com/samalba/dagger-test-simple.git
test::one "CLI: up: input is set with input git" \ test::one "CLI: up: input is set with input git" \