diff --git a/tests/test-cli.sh b/tests/test-cli.sh index 5d33251a..637d450d 100644 --- a/tests/test-cli.sh +++ b/tests/test-cli.sh @@ -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": {} +}' }