test: added cli test for new --plan-git
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
parent
540f373993
commit
8bb2cfbb21
@ -9,6 +9,7 @@ test::cli() {
|
|||||||
|
|
||||||
test::cli::list "$dagger"
|
test::cli::list "$dagger"
|
||||||
test::cli::newdir "$dagger"
|
test::cli::newdir "$dagger"
|
||||||
|
test::cli::newgit "$dagger"
|
||||||
test::cli::query "$dagger"
|
test::cli::query "$dagger"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +55,27 @@ test::cli::newdir() {
|
|||||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -f cue -d "simple" -c
|
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -f cue -d "simple" -c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test::cli::newgit() {
|
||||||
|
local dagger="$1"
|
||||||
|
|
||||||
|
# Create temporary store
|
||||||
|
local DAGGER_STORE
|
||||||
|
DAGGER_STORE="$(mktemp -d -t dagger-store-XXXXXX)"
|
||||||
|
export DAGGER_STORE
|
||||||
|
|
||||||
|
test::one "CLI: new: --plan-git" \
|
||||||
|
"$dagger" "${DAGGER_BINARY_ARGS[@]}" new --plan-git https://github.com/samalba/dagger-test.git simple
|
||||||
|
|
||||||
|
test::one "CLI: new: verify plan can be upped" \
|
||||||
|
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "simple"
|
||||||
|
|
||||||
|
test::one "CLI: new: verify we have the right plan" --stdout='{
|
||||||
|
foo: "value"
|
||||||
|
bar: "another value"
|
||||||
|
}' \
|
||||||
|
"$dagger" "${DAGGER_BINARY_ARGS[@]}" query -d "simple" -c
|
||||||
|
}
|
||||||
|
|
||||||
test::cli::query() {
|
test::cli::query() {
|
||||||
local dagger="$1"
|
local dagger="$1"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user