test: updates output list tests

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-06-01 14:15:02 +02:00
parent 06a515f496
commit 3d1e37e1ab
2 changed files with 12 additions and 11 deletions

View File

@ -326,13 +326,7 @@ setup() {
dagger_new_with_plan list "$TESTDIR"/cli/output/list dagger_new_with_plan list "$TESTDIR"/cli/output/list
run "$DAGGER" output list -e "list"
assert_failure
"$DAGGER" up -e "list"
out="$("$DAGGER" output list -e "list")" out="$("$DAGGER" output list -e "list")"
outAll="$("$DAGGER" output list --all -e "list")"
run bash -c "echo \"$out\" | grep cfgInline.url | grep 'http://this.is.a.test/' | grep 'test url description'" run bash -c "echo \"$out\" | grep cfgInline.url | grep 'http://this.is.a.test/' | grep 'test url description'"
assert_success assert_success
@ -343,12 +337,12 @@ setup() {
run bash -c "echo \"$out\" | grep cfg2.url | grep 'http://this.is.a.test/' | grep 'test url description'" run bash -c "echo \"$out\" | grep cfg2.url | grep 'http://this.is.a.test/' | grep 'test url description'"
assert_success assert_success
run bash -c "echo \"$out\" | grep cfg.str" run bash -c "echo \"$out\" | grep cfg.foo | grep '*42 | int'"
assert_failure
run bash -c "echo \"$outAll\" | grep cfg.str"
assert_success assert_success
run bash -c "echo \"$outAll\" | grep cfg2.url" run bash -c "echo \"$out\" | grep cfg2.bar | grep 'dagger.#Artifact'"
assert_success
run bash -c "echo \"$out\" | grep cfg2.str | grep 'string'"
assert_success assert_success
} }

View File

@ -1,5 +1,9 @@
package main package main
import (
"dagger.io/dagger"
)
#A: { #A: {
// a string // a string
str: string @dagger(output) str: string @dagger(output)
@ -9,6 +13,9 @@ package main
// test url description // test url description
url: "http://this.is.a.test/" @dagger(output) url: "http://this.is.a.test/" @dagger(output)
url2: url url2: url
foo: int | *42 @dagger(output)
bar: dagger.#Artifact @dagger(output)
} }
cfgInline: { cfgInline: {