This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/tests/core.bats
Solomon Hykes 53f4ef049a stdlib: dagger.#Output
Signed-off-by: Solomon Hykes <solomon@dagger.io>
2021-06-21 14:47:45 +02:00

36 lines
759 B
Bash

# Test core Dagger features & types
setup() {
load 'helpers'
common_setup
# Use native Dagger environment here
unset DAGGER_WORKSPACE
}
@test "core: inputs & outputs" {
# List available inputs
run dagger -e test-core input list
assert_success
assert_output --partial 'name'
assert_output --partial 'dir'
# Set text input
dagger -e test-core input text name Bob
run dagger -e test-core up
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!'
}