stdlib: dagger.#Output

Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
Solomon Hykes 2021-06-21 09:07:18 +00:00 committed by Solomon Hykes
parent 8383efdba6
commit 53f4ef049a
3 changed files with 14 additions and 3 deletions

View File

@ -8,8 +8,8 @@ name: dagger.#Input & {
string | *"world"
}
message: "Hello, \(name)!" @dagger(output)
message: dagger.#Output & "Hello, \(name)!"
dir: dagger.#Input & dagger.#Artifact
samedir: dir @dagger(output)
samedir: dagger.#Output & dir

View File

@ -25,3 +25,9 @@ import (
_
...
}
#Output: {
@dagger(output)
_
...
}

View File

@ -9,7 +9,7 @@ setup() {
unset DAGGER_WORKSPACE
}
@test "core: inputs" {
@test "core: inputs & outputs" {
# List available inputs
run dagger -e test-core input list
assert_success
@ -22,9 +22,14 @@ setup() {
assert_success
assert_output --partial 'Hello, Bob!'
run dagger -e test-core output list
assert_success
assert_output --partial 'message "Hello, Bob!"'
# Unset text input
dagger -e test-core input unset name
run dagger -e test-core up
assert_success
assert_output --partial 'Hello, world!'
}