dagger query [--format cue|json|text|yaml] (default is json)

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-04-02 22:47:59 +00:00
parent 11825932cc
commit e2e56a5143
4 changed files with 40 additions and 13 deletions

View File

@@ -51,7 +51,7 @@ test::cli::newdir() {
foo: "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() {
@@ -69,14 +69,14 @@ test::cli::query() {
foo: "value"
bar: "another value"
}' \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -d "simple" -c
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -f cue -d "simple" -c
test::one "CLI: query: target" --stdout='"value"' \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -d "simple" foo
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -f cue -d "simple" foo
test::one "CLI: query: initialize nonconcrete" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" new --plan-dir "$d"/cli/nonconcrete nonconcrete
test::one "CLI: query: non concrete" --exit=1 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -d "nonconcrete" -c
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -f cue -d "nonconcrete" -c
}