tests: re-enable CLI tests, use the brand new query
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
60db93a246
commit
43a34f0b04
@ -65,13 +65,13 @@ test::cli::newgit() {
|
||||
DAGGER_STORE="$(mktemp -d -t dagger-store-XXXXXX)"
|
||||
export DAGGER_STORE
|
||||
|
||||
disable test::one "CLI: new git: --plan-git" \
|
||||
test::one "CLI: new git: --plan-git" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" new --plan-git https://github.com/samalba/dagger-test.git simple
|
||||
|
||||
disable test::one "CLI: new git: verify plan can be upped" \
|
||||
test::one "CLI: new git: verify plan can be upped" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "simple"
|
||||
|
||||
disable test::one "CLI: new git: verify we have the right plan" --stdout='{
|
||||
test::one "CLI: new git: verify we have the right plan" --stdout='{
|
||||
foo: "value"
|
||||
bar: "another value"
|
||||
}' \
|
||||
@ -122,10 +122,10 @@ test::cli::plan() {
|
||||
test::one "CLI: plan dir: query non-concrete" --exit=1 \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" -d "simple" query -c
|
||||
|
||||
disable test::one "CLI: plan git (Disabled: external dependency)" \
|
||||
test::one "CLI: plan git" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" -d "simple" plan git https://github.com/samalba/dagger-test.git
|
||||
|
||||
disable test::one "CLI: plan git: verify we have the right plan" --stdout='{
|
||||
test::one "CLI: plan git: verify we have the right plan" --stdout='{
|
||||
foo: "value"
|
||||
bar: "another value"
|
||||
}' \
|
||||
@ -140,21 +140,40 @@ test::cli::input() {
|
||||
DAGGER_STORE="$(mktemp -d -t dagger-store-XXXXXX)"
|
||||
export DAGGER_STORE
|
||||
|
||||
test::one "CLI: new input" \
|
||||
test::one "CLI: input: new" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" new --plan-dir "$d"/cli/input "input"
|
||||
|
||||
test::one "CLI: up: missing input" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input" --stdout='{"foo":"bar"}'
|
||||
test::one "CLI: input: up missing input" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input"
|
||||
|
||||
test::one "CLI: input dir" \
|
||||
test::one "CLI: input: query missing input" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -d "input" --stdout='{
|
||||
"foo": "bar"
|
||||
}'
|
||||
|
||||
test::one "CLI: input: set dir" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" input -d "input" dir "source" ./tests/cli/input/testdata
|
||||
|
||||
test::one "CLI: up: input is set with input dir" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input" --stdout='{"bar":"thisisatest\n","foo":"bar","source":{}}'
|
||||
test::one "CLI: input: up with input dir" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input"
|
||||
|
||||
disable test::one "CLI: input git" \
|
||||
test::one "CLI: input: query with input dir" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -d "input" --stdout='{
|
||||
"bar": "thisisatest\n",
|
||||
"foo": "bar",
|
||||
"source": {}
|
||||
}'
|
||||
|
||||
test::one "CLI: input: set git" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" input -d "input" git "source" https://github.com/samalba/dagger-test-simple.git
|
||||
|
||||
disable test::one "CLI: up: input is set with input git" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input" --stdout='{"bar":"testgit\n","foo":"bar","source":{}}'
|
||||
test::one "CLI: input: up with input git" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input"
|
||||
|
||||
test::one "CLI: query with input git" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -d "input" --stdout='{
|
||||
"bar": "testgit\n",
|
||||
"foo": "bar",
|
||||
"source": {}
|
||||
}'
|
||||
}
|
||||
|
Reference in New Issue
Block a user