universe vendoring
Rather than injecting universe at runtime, this change will vendor alpha.dagger.io in `cue.mod` directly. Fixes #700 Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -15,30 +15,34 @@ setup() {
|
||||
# at the beginning of each new-style test.
|
||||
|
||||
@test "core: inputs & outputs" {
|
||||
# Use native Dagger environment here
|
||||
unset DAGGER_WORKSPACE
|
||||
dagger init
|
||||
|
||||
# List available inputs
|
||||
run dagger -e test-core input list
|
||||
assert_success
|
||||
assert_output --partial 'name'
|
||||
assert_output --partial 'dir'
|
||||
dagger_new_with_plan test-core "$TESTDIR"/core/inputs-outputs
|
||||
|
||||
# Set text input
|
||||
dagger -e test-core input text name Bob
|
||||
run dagger -e test-core up
|
||||
assert_success
|
||||
assert_output --partial 'Hello, Bob!'
|
||||
# List available inputs
|
||||
run dagger -e test-core input list
|
||||
assert_success
|
||||
assert_output --partial 'name'
|
||||
assert_output --partial 'dir'
|
||||
|
||||
run dagger -e test-core output list
|
||||
assert_success
|
||||
assert_output --partial 'message "Hello, Bob!"'
|
||||
# Set dir input
|
||||
dagger -e test-core input dir dir "$DAGGER_WORKSPACE"
|
||||
|
||||
# Unset text input
|
||||
dagger -e test-core input unset name
|
||||
run dagger -e test-core up
|
||||
assert_success
|
||||
assert_output --partial 'Hello, world!'
|
||||
# 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!'
|
||||
}
|
||||
|
||||
|
||||
|
15
tests/core/inputs-outputs/test-core.cue
Normal file
15
tests/core/inputs-outputs/test-core.cue
Normal file
@@ -0,0 +1,15 @@
|
||||
package testcore
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/dagger"
|
||||
)
|
||||
|
||||
name: dagger.#Input & {
|
||||
string | *"world"
|
||||
}
|
||||
|
||||
message: dagger.#Output & "Hello, \(name)!"
|
||||
|
||||
dir: dagger.#Input & dagger.#Artifact
|
||||
|
||||
samedir: dagger.#Output & dir
|
@@ -1 +1 @@
|
||||
module: "alpha.dagger.io/testing"
|
||||
module: "test.dagger.io/testing"
|
||||
|
@@ -2,7 +2,7 @@ package testing
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/dagger/op"
|
||||
"alpha.dagger.io/def"
|
||||
"test.dagger.io/def"
|
||||
)
|
||||
|
||||
#up: [
|
||||
|
@@ -1 +1 @@
|
||||
module: "alpha.dagger.io/testing"
|
||||
module: "test.dagger.io/testing"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package testing
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/nonoptional"
|
||||
"test.dagger.io/nonoptional"
|
||||
"alpha.dagger.io/dagger/op"
|
||||
)
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
module: "alpha.dagger.io/testing"
|
||||
module: "test.dagger.io/testing"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package testing
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/optional"
|
||||
"test.dagger.io/optional"
|
||||
"alpha.dagger.io/dagger/op"
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user