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:
Andrea Luzzardi
2021-07-01 19:42:52 +02:00
parent bf6a9f3588
commit f58ee5811b
17 changed files with 170 additions and 59 deletions

View File

@@ -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!'
}

View 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

View File

@@ -1 +1 @@
module: "alpha.dagger.io/testing"
module: "test.dagger.io/testing"

View File

@@ -2,7 +2,7 @@ package testing
import (
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/def"
"test.dagger.io/def"
)
#up: [

View File

@@ -1 +1 @@
module: "alpha.dagger.io/testing"
module: "test.dagger.io/testing"

View File

@@ -1,7 +1,7 @@
package testing
import (
"alpha.dagger.io/nonoptional"
"test.dagger.io/nonoptional"
"alpha.dagger.io/dagger/op"
)

View File

@@ -1 +1 @@
module: "alpha.dagger.io/testing"
module: "test.dagger.io/testing"

View File

@@ -1,7 +1,7 @@
package testing
import (
"alpha.dagger.io/optional"
"test.dagger.io/optional"
"alpha.dagger.io/dagger/op"
)