Remove pre-Europa tests

Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
Joel Longtine
2022-02-18 16:51:22 -07:00
parent 7e86b00962
commit 43a46128e0
511 changed files with 10 additions and 15691 deletions

View File

@@ -1,477 +0,0 @@
setup() {
load 'helpers'
common_setup
}
@test "dagger init" {
run "$DAGGER" init
assert_success
run "$DAGGER" list
assert_success
refute_output
run "$DAGGER" init
assert_failure
}
@test "dagger new" {
run "$DAGGER" new "test"
assert_failure
run "$DAGGER" init
assert_success
run "$DAGGER" list
assert_success
refute_output
run "$DAGGER" new "test"
assert_success
run "$DAGGER" list
assert_success
assert_output --partial "test"
run "$DAGGER" new "test"
assert_failure
}
# create different environments from the same module
@test "dagger new: modules" {
"$DAGGER" init
cp -a "$TESTDIR"/cli/input/simple/* "$DAGGER_PROJECT"
"$DAGGER" new "a"
"$DAGGER" new "b"
"$DAGGER" input -e "a" text "input" "a"
"$DAGGER" input -e "b" text "input" "b"
"$DAGGER" up -e "a"
"$DAGGER" up -e "b"
run "$DAGGER" query -l error -e "a" input -f text
assert_success
assert_output "a"
run "$DAGGER" query -l error -e "b" input -f text
assert_success
assert_output "b"
# run ls -la "$DAGGER_PROJECT"
# assert_failure
}
# create different environments from the same module,
# using different packages.
@test "dagger new: packages" {
"$DAGGER" init
cp -a "$TESTDIR"/cli/packages/* "$DAGGER_PROJECT"
"$DAGGER" new "a" --package alpha.dagger.io/test/a
"$DAGGER" new "b" --package alpha.dagger.io/test/b
"$DAGGER" up -e "a"
"$DAGGER" up -e "b"
run "$DAGGER" query -l error -e "a" exp -f text
assert_success
assert_output "a"
run "$DAGGER" query -l error -e "b" exp -f text
assert_success
assert_output "b"
}
@test "dagger query" {
"$DAGGER" init
dagger_new_with_plan simple "$TESTDIR"/cli/simple
run "$DAGGER" query -l error -e "simple"
assert_success
assert_output '{
"bar": "another value",
"foo": "value"
}'
# concrete should fail at this point since we haven't up'd
run "$DAGGER" query -e "simple" -c
assert_failure
# target
run "$DAGGER" -l error query -e "simple" foo
assert_success
assert_output '"value"'
# ensure computed values show up
"$DAGGER" up -e "simple"
run "$DAGGER" -l error query -e "simple"
assert_success
assert_output --partial '"computed": "test"'
# concrete should now work
"$DAGGER" query -e "simple" -c
# --no-computed should yield the same result as before
run "$DAGGER" query -l error --no-computed -e "simple"
assert_success
assert_output '{
"bar": "another value",
"foo": "value"
}'
# --no-plan should give us only the computed values
run "$DAGGER" query -l error --no-plan -e "simple"
assert_success
assert_output '{
"computed": "test"
}'
}
@test "dagger input text" {
"$DAGGER" init
dagger_new_with_plan input "$TESTDIR"/cli/input/simple
# wrong input type
run "$DAGGER" input -e "input" secret "input" "my input"
assert_failure
# invalid input
run "$DAGGER" input -e "input" secret "input.notexist" "my input"
assert_failure
# simple input
"$DAGGER" input -e "input" text "input" "my input"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" input
assert_success
assert_output '"my input"'
# unset simple input
"$DAGGER" input -e "input" unset "input"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" input
assert_success
assert_output 'null'
# nested input
"$DAGGER" input -e "input" text "nested.input" "nested input"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" nested
assert_success
assert_output '{
"input": "nested input"
}'
# unset nested input
"$DAGGER" input -e "input" unset "nested.input"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" nested
assert_success
assert_output 'null'
# file input
"$DAGGER" input -e "input" text "input" -f "$TESTDIR"/cli/input/simple/testdata/input.txt
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" input
assert_success
assert_output '"from file\n"'
# unset file input
"$DAGGER" input -e "input" unset "input"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" input
assert_success
assert_output 'null'
# invalid file
run "$DAGGER" input -e "input" text "input" -f "$TESTDIR"/cli/input/simple/testdata/notexist
assert_failure
# stdin input
echo -n "from stdin" | "$DAGGER" input -e "input" text "input" -f -
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" input
assert_success
assert_output '"from stdin"'
# unset stdin input
"$DAGGER" input -e "input" unset "input"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" input
assert_success
assert_output 'null'
}
@test "dagger input json" {
"$DAGGER" init
dagger_new_with_plan input "$TESTDIR"/cli/input/simple
# simple json
"$DAGGER" input -e "input" json "structured" '{"a": "foo", "b": 42}'
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" structured
assert_success
assert_output '{
"a": "foo",
"b": 42
}'
# unset simple json
"$DAGGER" input -e "input" unset "structured"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" structured
assert_success
assert_output 'null'
# json from file
"$DAGGER" input -e "input" json "structured" -f "$TESTDIR"/cli/input/simple/testdata/input.json
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" structured
assert_success
assert_output '{
"a": "from file",
"b": 42
}'
# unset json from file
"$DAGGER" input -e "input" unset "structured"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" structured
assert_success
assert_output 'null'
}
@test "dagger input yaml" {
"$DAGGER" init
dagger_new_with_plan input "$TESTDIR"/cli/input/simple
# simple yaml
"$DAGGER" input -e "input" yaml "structured" '{"a": "foo", "b": 42}'
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" structured
assert_success
assert_output '{
"a": "foo",
"b": 42
}'
# unset simple yaml
"$DAGGER" input -e "input" unset "structured"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" structured
assert_success
assert_output 'null'
# yaml from file
"$DAGGER" input -e "input" yaml "structured" -f "$TESTDIR"/cli/input/simple/testdata/input.yaml
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" structured
assert_success
assert_output '{
"a": "from file",
"b": 42
}'
# unset yaml from file
"$DAGGER" input -e "input" unset "structured"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input" structured
assert_success
assert_output 'null'
}
@test "dagger input dir" {
"$DAGGER" init
dagger_new_with_plan input "$TESTDIR"/cli/input/artifact
# input dir outside the project
run "$DAGGER" input -e "input" dir "source" /tmp
assert_failure
# input dir inside the project
cp -R "$TESTDIR"/cli/input/artifact/testdata/ "$DAGGER_PROJECT"/testdata
"$DAGGER" input -e "input" dir "source" "$DAGGER_PROJECT"/testdata
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input"
assert_success
assert_output '{
"bar": "thisisatest\n",
"foo": "bar",
"source": {}
}'
# unset dir
"$DAGGER" input -e "input" unset "source"
"$DAGGER" up -e "input"
run "$DAGGER" -l error query -e "input"
assert_success
assert_output '{
"foo": "bar"
}'
run "$DAGGER" input dir src xxx -e "input"
assert_failure
assert_output --partial "dir doesn't exist"
}
@test "dagger input dir: ignore .dagger" {
"$DAGGER" init
dagger_new_with_plan input "$TESTDIR"/cli/input/ignore
run [ -d "$TESTDIR"/cli/input/ignore/testdata/.dagger ]
assert_success
cp -R "$TESTDIR"/cli/input/ignore/testdata/ "$DAGGER_PROJECT"/testdata
"$DAGGER" input -e "input" dir "source" "$DAGGER_PROJECT"/testdata
"$DAGGER" up -e "input"
assert_success
}
@test "dagger input git" {
"$DAGGER" init
## Test simple input git
dagger_new_with_plan "input-simple-git" "$TESTDIR"/cli/input/artifact
# input git
"$DAGGER" -e "input-simple-git" input list
"$DAGGER" -e "input-simple-git" input git source "https://github.com/samalba/dagger-test-simple"
"$DAGGER" -e "input-simple-git" input list
"$DAGGER" -e "input-simple-git" up --no-cache
run "$DAGGER" -l error query -e "input-simple-git"
assert_output '{
"bar": "testgit\n",
"foo": "bar",
"source": {}
}'
# unset input git
"$DAGGER" input -e "input-simple-git" unset "source"
"$DAGGER" up -e "input-simple-git"
run "$DAGGER" -l error query -e "input-simple-git"
assert_output '{
"foo": "bar"
}'
## Test input git with subdir
dagger_new_with_plan "input-subdir-git" "$TESTDIR"/cli/input/git
# input git
"$DAGGER" -e "input-subdir-git" input git TestRepo "https://github.com/dagger/examples" "main" "todoapp"
# Assert success (test is directly in the cue file)
"$DAGGER" -e "input-subdir-git" up
}
@test "dagger input bool" {
"$DAGGER" init
## Test simple input git
dagger_new_with_plan "input-simple-bool" "$TESTDIR"/cli/input/bool
# input git
"$DAGGER" -e "input-simple-bool" input list --show-optional
run "$DAGGER" -e "input-simple-bool" query first
assert_output 'false'
run "$DAGGER" -e "input-simple-bool" query second
assert_output '{}'
"$DAGGER" -e "input-simple-bool" input bool first true
run "$DAGGER" -e "input-simple-bool" query first
assert_output 'true'
run "$DAGGER" -e "input-simple-bool" query second
assert_output 'true'
"$DAGGER" -e "input-simple-bool" input bool first false
run "$DAGGER" -e "input-simple-bool" query first
assert_output 'false'
run "$DAGGER" -e "input-simple-bool" query second
assert_output '{}'
run "$DAGGER" -e "input-simple-bool" input bool first Anything
assert_failure
}
@test "dagger input list" {
"$DAGGER" init
dagger_new_with_plan list "$TESTDIR"/cli/input/list
"$DAGGER" input text cfg.str "foobar" -e "list"
out="$("$DAGGER" input list -e "list")"
outOpt="$("$DAGGER" input list --show-optional -e "list")"
outAll="$("$DAGGER" input list --all -e "list")"
#note: this is the recommended way to use pipes with bats
run bash -c "echo \"$out\" | grep awsConfig.accessKey | grep 'dagger.#Secret' | grep false | grep 'AWS access key'"
assert_success
run bash -c "echo \"$out\" | grep cfgInline.source | grep 'dagger.#Artifact' | grep false | grep 'source dir'"
assert_success
run bash -c "echo \"$outOpt\" | grep awsConfig.accessKey | grep 'dagger.#Secret' | grep 'AWS access key'"
assert_success
run bash -c "echo \"$outOpt\" | grep cfgInline.source | grep 'dagger.#Artifact' | grep false | grep 'source dir'"
assert_success
run bash -c "echo \"$outAll\" | grep cfg2"
assert_failure
run bash -c "echo \"$out\" | grep cfgInline.strDef | grep '*yolo | string' | grep false"
assert_failure
run bash -c "echo \"$outOpt\" | grep cfgInline.strDef | grep '*yolo | string' | grep false"
assert_success
run bash -c "echo \"$out\" | grep cfg.num"
assert_failure
run bash -c "echo \"$outOpt\" | grep cfg.num"
assert_failure
run bash -c "echo \"$outAll\" | grep cfg.num | grep 21 | grep -v int"
assert_success
run bash -c "echo \"$outOpt\" | grep cfg.strSet"
assert_failure
run bash -c "echo \"$outAll\" | grep cfg.strSet | grep pipo"
assert_success
}
@test "dagger output list" {
"$DAGGER" init
dagger_new_with_plan list "$TESTDIR"/cli/output/list
out="$("$DAGGER" output list -e "list")"
run bash -c "echo \"$out\" | grep cfgInline.url | grep 'http://this.is.a.test/' | grep 'test url description'"
assert_success
run bash -c "echo \"$out\" | grep cfg.url | grep 'http://this.is.a.test/' | grep 'test url description'"
assert_success
run bash -c "echo \"$out\" | grep cfg2.url | grep 'http://this.is.a.test/' | grep 'test url description'"
assert_success
run bash -c "echo \"$out\" | grep cfg.foo | grep '*42 | int'"
assert_success
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
}

View File

@@ -1,25 +0,0 @@
package testing
import (
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/dagger"
)
source: dagger.#Artifact
foo: "bar"
bar: {
string
#up: [
op.#FetchContainer & {ref: "busybox"},
op.#Exec & {
args: ["cp", "/source/testfile", "/out"]
mount: "/source": from: source
},
op.#Export & {
format: "string"
source: "/out"
},
]
}

View File

@@ -1 +0,0 @@
thisisatest

View File

@@ -1,11 +0,0 @@
package testing
import (
"alpha.dagger.io/dagger"
)
first: dagger.#Input & {bool | *false}
if first == true {
second: true
}

View File

@@ -1,18 +0,0 @@
package testing
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/os"
)
// Input https://github.com/dagger/examples/tree/main/todoapp
TestRepo: dagger.#Input & {dagger.#Artifact}
// Check README.md
TestFolder: os.#Container & {
always: true
command: #"""
grep -q "Todo APP" /input/repo/README.md
"""#
mount: "/input/repo": from: TestRepo
}

View File

@@ -1,20 +0,0 @@
package testing
import (
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/dagger"
)
source: dagger.#Artifact
#up: [
op.#FetchContainer & {ref: "busybox"},
op.#Exec & {
args: ["sh", "-c", """
set -exu
[ -f /source/testfile ]
[ ! -d /source/.dagger ]
"""]
mount: "/source": from: source
},
]

View File

@@ -1 +0,0 @@
thisisatest

View File

@@ -1,44 +0,0 @@
package main
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/aws"
)
awsConfig: aws.#Config & {
// force region
region: "us-east-1"
}
#A: {
// source dir
source: dagger.#Artifact @dagger(input)
sourceNotInput: dagger.#Artifact
// a secret
key: dagger.#Secret @dagger(input)
keyNotInput: dagger.#Secret
// a string
str: string @dagger(input)
strSet: "pipo" @dagger(input)
strDef: *"yolo" | string @dagger(input)
// a number
num: int | *42 @dagger(input)
numNotInput: int
// aws config
cfg: awsConfig
}
cfgInline: {
#A
}
cfg: #A & {
// force this key
num: 21
}
cfg2: cfg

View File

@@ -1,10 +0,0 @@
package testing
input: string
nested: input: string
structured: {
a: string
b: int
}

View File

@@ -1,4 +0,0 @@
{
"a": "from file",
"b": 42
}

View File

@@ -1 +0,0 @@
from file

View File

@@ -1,2 +0,0 @@
a: "from file"
b: 42

View File

@@ -1,26 +0,0 @@
package main
import (
"alpha.dagger.io/dagger"
)
#A: {
// a string
str: string @dagger(output)
strSet: "pipo" @dagger(input)
strDef: *"yolo" | string @dagger(input)
// test url description
url: "http://this.is.a.test/" @dagger(output)
url2: url
foo: int | *42 @dagger(output)
bar: dagger.#Artifact @dagger(output)
}
cfgInline: {
#A
}
cfg: #A
cfg2: cfg

View File

@@ -1,19 +0,0 @@
package a
import "alpha.dagger.io/dagger/op"
exp: {
string
#up: [
op.#FetchContainer & {ref: "busybox"},
op.#Exec & {
args: ["sh", "-c", """
printf a > /export
"""]
},
op.#Export & {
source: "/export"
format: "string"
},
]
}

View File

@@ -1,19 +0,0 @@
package b
import "alpha.dagger.io/dagger/op"
exp: {
string
#up: [
op.#FetchContainer & {ref: "busybox"},
op.#Exec & {
args: ["sh", "-c", """
printf b > /export
"""]
},
op.#Export & {
source: "/export"
format: "string"
},
]
}

View File

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

View File

@@ -1,21 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
foo: "value"
bar: "another value"
computed: {
string
#up: [
op.#FetchContainer & {ref: "busybox"},
op.#Exec & {
args: ["sh", "-c", """
printf test > /export
"""]
},
op.#Export & {
source: "/export"
format: "string"
},
]
}

View File

@@ -1,151 +0,0 @@
# Test core Dagger features & types
setup() {
load 'helpers'
common_setup
}
# This file combines 2 types of tests:
# old-style tests: use 'dagger compute'
# new-style tests: use 'dagger up'
#
# For new tests, please adopt new-style.
# NOTE: you will need to 'unset DAGGER_PROJECT'
# at the beginning of each new-style test.
@test "core: inputs & outputs" {
dagger init
dagger_new_with_plan test-core "$TESTDIR"/core/inputs-outputs
# List available inputs
run dagger -e test-core input list --show-optional
assert_success
assert_output --partial 'name'
assert_output --partial 'dir'
# Set dir input
dagger -e test-core input dir dir "$DAGGER_PROJECT"
# 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!'
}
@test "core: simple" {
run "$DAGGER" compute "$TESTDIR"/core/compute/invalid/string
assert_failure
run "$DAGGER" compute "$TESTDIR"/core/compute/invalid/bool
assert_failure
run "$DAGGER" compute "$TESTDIR"/core/compute/invalid/int
assert_failure
run "$DAGGER" compute "$TESTDIR"/core/compute/invalid/struct
assert_failure
run "$DAGGER" compute "$TESTDIR"/core/compute/success/noop
assert_success
assert_line '{"empty":{}}'
run "$DAGGER" compute "$TESTDIR"/core/compute/success/simple
assert_success
assert_line '{}'
run "$DAGGER" compute "$TESTDIR"/core/compute/success/overload/flat
assert_success
run "$DAGGER" compute "$TESTDIR"/core/compute/success/overload/wrapped
assert_success
run "$DAGGER" compute "$TESTDIR"/core/compute/success/exec-nocache
assert_success
}
@test "core: dependencies" {
run "$DAGGER" compute "$TESTDIR"/core/dependencies/simple
assert_success
assert_line '{"A":{"result":"from A"},"B":{"result":"dependency from A"}}'
run "$DAGGER" compute "$TESTDIR"/core/dependencies/interpolation
assert_success
assert_line '{"A":{"result":"from A"},"B":{"result":"dependency from A"}}'
run "$DAGGER" compute "$TESTDIR"/core/dependencies/unmarshal
assert_success
assert_line '{"A":"{\"hello\": \"world\"}\n","B":{"result":"unmarshalled.hello=world"},"unmarshalled":{"hello":"world"}}'
}
@test "core: secrets" {
# secrets used as environment variables must fail
run "$DAGGER" compute "$TESTDIR"/core/secrets/invalid/env
assert_failure
assert_line --partial "conflicting values"
# strings passed as secrets must fail
run "$DAGGER" compute "$TESTDIR"/core/secrets/invalid/string
assert_failure
# Setting a text input for a secret value should fail
run "$DAGGER" compute --input-string 'mySecret=SecretValue' "$TESTDIR"/core/secrets/simple
assert_failure
# Now test with an actual secret and make sure it works
"$DAGGER" init
dagger_new_with_plan secrets "$TESTDIR"/core/secrets/simple
"$DAGGER" input secret mySecret SecretValue
run "$DAGGER" up
assert_success
}
@test "core: stream" {
dagger init
dagger_new_with_plan test-stream "$TESTDIR"/core/stream
# Set dir input
"$DAGGER" input socket dockersocket /var/run/docker.sock
"$DAGGER" up
}
@test "core: platform config" {
dagger init
# Test for amd64 platform
dagger_new_with_plan test-amd "$TESTDIR"/core/platform-config "linux/amd64"
# Set arch expected value
"$DAGGER" -e test-amd input text targetArch "x86_64"
# Up amd
"$DAGGER" -e test-amd up --no-cache
# Test for amd64 platform
dagger_new_with_plan test-arm "$TESTDIR"/core/platform-config "linux/arm64"
# Set arch expected value
"$DAGGER" -e test-arm input text targetArch "aarch64"
# Up arm
"$DAGGER" -e test-arm up --no-cache
}
@test "core: exclude" {
"$DAGGER" up --project "$TESTDIR"/core/exclude
}

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,3 +0,0 @@
package testing
#up: true

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,3 +0,0 @@
package testing
#up: 123

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,3 +0,0 @@
package testing
#up: "whatever"

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,3 +0,0 @@
package testing
#up: whatever: "wrong"

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,25 +0,0 @@
package main
import (
"alpha.dagger.io/alpine"
"alpha.dagger.io/dagger/op"
)
rand: {
string
#up: [
op.#Load & {from: alpine.#Image},
op.#Exec & {
always: true
args: ["sh", "-c", """
tr -dc A-Za-z0-9 </dev/urandom | head -c 13 > /id
"""]
},
op.#Export & {source: "/id"},
]
}
// If rand is executed twice, cue won't validate
ref1: rand
ref2: ref1

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,6 +0,0 @@
package testing
// no-op, should not error
empty: {
#up: []
}

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,19 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
new_prop: "lala"
#new_def: "lala"
new_prop_too: string
#new_def_too: string
#up: [
op.#FetchContainer & {
ref: "busybox"
},
op.#Exec & {
args: ["true"]
dir: "/"
},
]

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,21 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
foo: {
new_prop: "lala"
#new_def: "lala"
new_prop_too: string
#new_def_too: string
#up: [
op.#FetchContainer & {
ref: "busybox"
},
op.#Exec & {
args: ["true"]
dir: "/"
},
]
}

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,13 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
#up: [
op.#FetchContainer & {
ref: "busybox"
},
op.#Exec & {
args: ["true"]
dir: "/"
},
]

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,47 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
A: {
result: string
#up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
args: ["sh", "-c", """
echo '{"result": "from A"}' > /tmp/out
""",
]
dir: "/"
},
op.#Export & {
// Source path in the container
source: "/tmp/out"
format: "json"
},
]
}
B: {
result: string
#up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
args: ["sh", "-c", """
echo "{\\"result\\": \\"dependency \(A.result)\\"}" > /tmp/out
""",
]
dir: "/"
},
op.#Export & {
// Source path in the container
source: "/tmp/out"
format: "json"
},
]
}

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,47 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
A: {
result: string
#up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
args: ["sh", "-c", """
echo '{"result": "from A"}' > /tmp/out
""",
]
},
op.#Export & {
// Source path in the container
source: "/tmp/out"
format: "json"
},
]
}
B: {
result: string
#up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
env: DATA: A.result
args: ["sh", "-c", """
echo "{\\"result\\": \\"dependency $DATA\\"}" > /tmp/out
""",
]
dir: "/"
},
op.#Export & {
// Source path in the container
source: "/tmp/out"
format: "json"
},
]
}

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,52 +0,0 @@
package testing
import (
"encoding/json"
"alpha.dagger.io/dagger/op"
)
A: {
string
#up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
args: ["sh", "-c", """
echo '{"hello": "world"}' > /tmp/out
""",
]
dir: "/"
},
op.#Export & {
// Source path in the container
source: "/tmp/out"
format: "string"
},
]
}
unmarshalled: json.Unmarshal(A)
B: {
result: string
#up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
args: ["sh", "-c", """
echo "{\\"result\\": \\"unmarshalled.hello=\(unmarshalled.hello)\\"}" > /tmp/out
""",
]
dir: "/"
},
op.#Export & {
// Source path in the container
source: "/tmp/out"
format: "json"
},
]
}

View File

@@ -1,2 +0,0 @@
# dagger state
state/**

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,41 +0,0 @@
package testing
import (
"alpha.dagger.io/alpine"
"alpha.dagger.io/dagger"
"alpha.dagger.io/dagger/op"
)
TestData: dagger.#Artifact
_expected: """
/src/b.txt
/src/foo:
bar.txt
"""
TestIgnore: {
string
#up: [
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: ["sh", "-c", "ls /src/* > /out.txt"]
mount: "/src": from: TestData
},
op.#Export & {source: "/out.txt"},
op.#Exec & {
args: [
"sh",
"-ec",
"""
cat > /test.txt << EOF
\(_expected)
EOF
test "$(cat /out.txt)" = "$(cat /test.txt)"
""",
]
},
]
}

View File

@@ -1,30 +0,0 @@
plan:
module: .dagger/env/default/plan
name: default
inputs:
TestData:
dir:
path: ./testdata
exclude:
- a.txt
- '*/*.json'
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSArcmRHMFByQkZSdGhteHhm
T2pSWW1UcU5LaFJabFJORllydFk3UkVsSHhVCndQZWNUKzVOeUovTTdCR3FmUXpO
c29GQXhpZkxwSmoweWxqZG1CMkcrRGcKLS0tIDhRMTVSc3NXSWIxSm55TGkwT1E1
L0NzY0RIMWNkc3k2WStOUGg4SndNRm8Kk7QSP/8spn1Set08VejVW9k4ZwBFqR0T
Ff/N73yNvo633hrfEJtTkhA/aZYyG9bPJy9s9vRDoNFkdTLSFcYX5g==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2021-06-15T16:27:05Z"
mac: ENC[AES256_GCM,data:XQyAun4JVQxzV9eqte3dpQb8YP9ylWhnW5gLB3avpOZks/CVUN4Ewgob5tA4FB5S4x1Syk/D8ts32nQoEd0HUkdqTMjnGjcXdNiH/iT+k+LrVX30uAZ3JLXmzBfP9WnfJXlKVYaWXWSokiQJmYjXtmotr9rMl7rQeixGZfYcsns=,iv:LyfYlgbiiTh1oapa/h7FUGjd8xGlrD0M9+bxkP5HT6A=,tag:bhw5k2/4zGCxC0nnV4zwDw==,type:str]
pgp: []
encrypted_suffix: secret
version: 3.7.1

View File

View File

View File

@@ -1,15 +0,0 @@
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,58 +0,0 @@
package main
import (
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/dagger"
)
targetArch: dagger.#Input & {string}
TestFetch: #up: [
op.#FetchContainer & {
ref: "docker.io/alpine"
},
op.#Exec & {
args: ["/bin/sh", "-c", "echo $(uname -a) >> /platform.txt"]
always: true
},
op.#Exec & {
args: ["/bin/sh", "-c", """
cat /platform.txt | grep "$TARGET_ARCH"
"""]
env: TARGET_ARCH: targetArch
},
]
TestBuild: #up: [
op.#DockerBuild & {
dockerfile: """
FROM alpine
RUN echo $(uname -a) > /platform.txt
"""
},
op.#Exec & {
args: ["/bin/sh", "-c", """
cat /platform.txt | grep "$TARGET_ARCH"
"""]
env: TARGET_ARCH: targetArch
},
]
TestLoad: #up: [
op.#Load & {
from: TestBuild
},
// Compare arch
op.#Exec & {
args: ["/bin/sh", "-c", "diff /build/platform.txt /fetch/platform.txt"]
mount: {
"/build": from: TestBuild
"/fetch": from: TestFetch
}
},
]

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,4 +0,0 @@
# dagger universe
alpha.dagger.io
dagger.io
universe.dagger.io

View File

@@ -1,21 +0,0 @@
package testing
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/alpine"
)
mySecret: dagger.#Secret
TestSecrets: #up: [
op.#Load & {
from: alpine.#Image & {
package: bash: true
}
},
op.#Exec & {
env: foo: mySecret
},
]

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,4 +0,0 @@
# dagger universe
alpha.dagger.io
dagger.io
universe.dagger.io

View File

@@ -1,21 +0,0 @@
package testing
import (
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/alpine"
)
mySecret: dagger.#Secret
TestString: #up: [
op.#Load & {
from: alpine.#Image & {
package: bash: true
}
},
op.#Exec & {
mount: "/secret": secret: mySecret
args: ["true"]
},
]

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,4 +0,0 @@
# dagger universe
alpha.dagger.io
dagger.io
universe.dagger.io

View File

@@ -1,32 +0,0 @@
package testing
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/alpine"
)
mySecret: dagger.#Secret
TestSecrets: #up: [
op.#Load & {
from: alpine.#Image & {
package: bash: true
}
},
op.#Exec & {
mount: "/secret": secret: mySecret
args: [
"/bin/bash",
"--noprofile",
"--norc",
"-eo",
"pipefail",
"-c",
#"""
test "$(cat /secret)" = "SecretValue"
"""#,
]
},
]

View File

@@ -1,23 +0,0 @@
package main
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/alpine"
)
dockersocket: dagger.#Stream & dagger.#Input
TestDockerSocket: #up: [
op.#Load & {
from: alpine.#Image & {
package: "docker-cli": true
}
},
op.#Exec & {
always: true
mount: "/var/run/docker.sock": stream: dockersocket
args: ["docker", "info"]
},
]

View File

@@ -1,243 +0,0 @@
setup() {
load 'helpers'
common_setup
}
@test "op.#Load" {
run "$DAGGER" compute "$TESTDIR"/ops/load/valid/component
assert_success
assert_line '{"TestComponent":{},"TestComponentLoad":"lol","TestNestedLoad":"lol"}'
run "$DAGGER" compute "$TESTDIR"/ops/load/valid/script
assert_success
run "$DAGGER" compute "$TESTDIR"/ops/load/invalid/cache
assert_failure
}
@test "op.#Mount" {
# tmpfs
run "$DAGGER" compute "$TESTDIR"/ops/mounts/valid/tmpfs
assert_line '{"TestMountTmpfs":"ok"}'
assert_success
# cache
run "$DAGGER" compute "$TESTDIR"/ops/mounts/valid/cache
assert_success
# component
run "$DAGGER" compute "$TESTDIR"/ops/mounts/valid/component
assert_success
assert_line '{"test":"hello world"}'
# Invalid mount path
run "$DAGGER" compute "$TESTDIR"/ops/mounts/valid/script
assert_failure
}
@test "op.#Copy" {
run "$DAGGER" compute "$TESTDIR"/ops/copy/valid/component
assert_success
assert_line '{"TestComponent":{},"TestComponentCopy":"lol","TestNestedCopy":"lol"}'
run "$DAGGER" compute "$TESTDIR"/ops/copy/valid/script
assert_success
run "$DAGGER" compute "$TESTDIR"/ops/copy/invalid/cache
assert_failure
}
@test "op.#Local" {
skip "There are no local tests right now"
}
@test "op.#FetchContainer" {
# non existent container image"
run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/nonexistent/image
assert_failure
# non existent container tag
run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/nonexistent/tag
assert_failure
# non existent container digest
run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/nonexistent/digest
assert_failure
# valid containers
run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/exist
assert_success
# missing ref
# FIXME: distinguish missing inputs from incorrect config
# run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/invalid
# assert_failure
# non existent container image with valid digest
# FIXME https://github.com/blocklayerhq/dagger/issues/32
# run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/nonexistent/image-with-valid-digest
# assert_failure
}
@test "op.#PushContainer" {
dagger_new_with_env "$TESTDIR"/ops/push-container/
run "$DAGGER" up -e push-container
assert_success
}
@test "op.#FetchGit" {
run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/exist
assert_success
run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/nonexistent/remote
assert_failure
run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/nonexistent/ref
assert_failure
run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/nonexistent/bork
assert_failure
run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/gitdir
assert_success
dagger_new_with_env "$TESTDIR"/ops/fetch-git/private-repo
run "$DAGGER" up -e op-fetch-git
assert_success
# FIXME: distinguish missing inputs from incorrect config
# run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/invalid
# assert_failure
}
@test "op.#FetchHTTP" {
run "$DAGGER" compute "$TESTDIR"/ops/fetch-http/exist
assert_success
run "$DAGGER" compute "$TESTDIR"/ops/fetch-http/nonexistent
assert_failure
}
@test "op.#Exec" {
run "$DAGGER" compute "$TESTDIR"/ops/exec/invalid
assert_failure
run "$DAGGER" compute "$TESTDIR"/ops/exec/error
assert_failure
run "$DAGGER" compute "$TESTDIR"/ops/exec/simple
assert_success
# XXX should run twice and test that the string "always output" is visible with DOCKER_OUTPUT=1
# Alternatively, use export, but this would test multiple things then...
run "$DAGGER" compute "$TESTDIR"/ops/exec/always
assert_success
run "$DAGGER" compute "$TESTDIR"/ops/exec/env/invalid
assert_failure
run "$DAGGER" compute "$TESTDIR"/ops/exec/env/valid
assert_success
run "$DAGGER" compute --input-string 'bar=overlay environment' "$TESTDIR"/ops/exec/env/overlay
assert_success
run "$DAGGER" compute "$TESTDIR"/ops/exec/dir/doesnotexist
assert_success
run "$DAGGER" compute "$TESTDIR"/ops/exec/dir/exist
assert_success
run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/non_concrete_referenced
assert_success
assert_line '{"hello":"world"}'
# NOTE: the exec is meant to fail - and we test that as a way to confirm it has been executed
run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/non_concrete_not_referenced
assert_failure
# package with optional def, not referenced, should be executed
run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/with_pkg_def
assert_success
# script with optional prop, not referenced, should be executed
run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/with_pkg_optional
assert_success
# FIXME https://github.com/blocklayerhq/dagger/issues/74
# run "$DAGGER" compute "$TESTDIR"/ops/exec/exit_code
# assert_failure # --exit=123
# script with non-optional prop, not referenced, should be executed
run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/with_pkg_mandatory
assert_success
}
@test "op.#Export" {
run "$DAGGER" compute "$TESTDIR"/ops/export/json
assert_success
assert_line '{"TestExportList":["milk","pumpkin pie","eggs","juice"],"TestExportMap":{"something":"something"},"TestExportScalar":true}'
run "$DAGGER" compute "$TESTDIR"/ops/export/string
assert_success
assert_line '{"TestExportString":"something"}'
run "$DAGGER" compute "$TESTDIR"/ops/export/withvalidation
assert_success
assert_line '{"TestExportStringValidation":"something"}'
run "$DAGGER" compute "$TESTDIR"/ops/export/concurrency
assert_success
assert_line '{"TestExportConcurrency1":"lol1","TestExportConcurrency10":"lol10","TestExportConcurrency2":"lol2","TestExportConcurrency3":"lol3","TestExportConcurrency4":"lol4","TestExportConcurrency5":"lol5","TestExportConcurrency6":"lol6","TestExportConcurrency7":"lol7","TestExportConcurrency8":"lol8","TestExportConcurrency9":"lol9"}'
# does not pass additional validation
run "$DAGGER" compute "$TESTDIR"/ops/export/invalid/validation
assert_failure
# invalid format
run "$DAGGER" compute "$TESTDIR"/ops/export/invalid/format
assert_failure
# invalid path
run "$DAGGER" compute "$TESTDIR"/ops/export/invalid/path
assert_failure
run "$DAGGER" compute "$TESTDIR"/ops/export/float
assert_success
assert_line '{"TestExportFloat":-123.5}'
run "$DAGGER" compute "$TESTDIR"/ops/export/yaml
assert_success
assert_line '{"TestExportList":["milk","pumpkin pie","eggs","juice"],"TestExportMap":{"something":"something"},"TestExportScalar":true}'
run "$DAGGER" compute "$TESTDIR"/ops/export/bool
assert_success
assert_line '{"TestExportBool":true}'
run "$DAGGER" compute "$TESTDIR"/ops/export/number
assert_success
assert_line '{"TestExportNumber":-123.5}'
}
@test "op.#Subdir" {
run "$DAGGER" compute "$TESTDIR"/ops/subdir/valid/simple
assert_success
assert_line '{"TestSimpleSubdir":"world"}'
run "$DAGGER" compute "$TESTDIR"/ops/subdir/valid/container
assert_success
assert_line '{"TestSubdirMount":"world"}'
run "$DAGGER" compute "$TESTDIR"/ops/subdir/invalid/exec
assert_failure
run "$DAGGER" compute "$TESTDIR"/ops/subdir/invalid/path
assert_failure
}
@test "op.#DockerBuild" {
run "$DAGGER" compute --input-dir TestData="$TESTDIR"/ops/dockerbuild/testdata "$TESTDIR"/ops/dockerbuild
assert_success
}

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,49 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
TestCacheCopyLoadAlpine: {
string
#up: [
op.#FetchContainer & {
ref: "busybox"
},
op.#Copy & {
from: [
op.#FetchContainer & {
ref: "alpine"
},
]
src: "/etc/issue"
dest: "/"
},
op.#Export & {
source: "/issue"
format: "string"
},
]
}
TestCacheCopy: {
string
#up: [
op.#FetchContainer & {
ref: "busybox"
},
op.#Copy & {
from: [
op.#FetchContainer & {
ref: "busybox"
},
]
src: "/etc/issue"
dest: "/"
},
op.#Export & {
source: "/issue"
format: "string"
},
]
}

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,61 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
TestComponent: #up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
args: ["sh", "-c", """
printf lol > /id
"""]
},
]
TestComponentCopy: {
string
#up: [
op.#FetchContainer & {
ref: "busybox"
},
op.#Copy & {
from: TestComponent
src: "/id"
dest: "/"
},
op.#Export & {
source: "/id"
format: "string"
},
]
}
TestNestedCopy: {
string
#up: [
op.#FetchContainer & {
ref: "busybox"
},
op.#Copy & {
from: #up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
args: ["sh", "-c", """
printf lol > /id
"""]
},
]
src: "/id"
dest: "/"
},
op.#Export & {
source: "/id"
format: "string"
},
]
}

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,26 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
TestScriptCopy: {
string
#up: [
op.#FetchContainer & {
ref: "busybox"
},
op.#Copy & {
from: [
op.#FetchContainer & {
ref: "alpine"
},
]
src: "/etc/issue"
dest: "/"
},
op.#Export & {
source: "/issue"
format: "string"
},
]
}

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,122 +0,0 @@
package testing
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/dagger/op"
)
// Set to `--input-dir=./tests/dockerbuild/testdata`
TestData: dagger.#Artifact
TestInlinedDockerfile: #up: [
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
RUN echo hello world
"""
},
]
TestOpChaining: #up: [
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
RUN echo foobar > /output
"""
},
op.#Exec & {
args: ["sh", "-c", "test $(cat /output) = foobar"]
},
]
TestBuildContext: #up: [
op.#DockerBuild & {
context: TestData
},
op.#Exec & {
args: ["sh", "-c", "test $(cat /dir/foo) = foobar"]
},
]
TestBuildContextAndDockerfile: #up: [
op.#DockerBuild & {
context: TestData
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
COPY foo /override
"""
},
op.#Exec & {
args: ["sh", "-c", "test $(cat /override) = foobar"]
},
]
TestDockerfilePath: #up: [
op.#DockerBuild & {
context: TestData
dockerfilePath: "./dockerfilepath/Dockerfile.custom"
},
op.#Exec & {
args: ["sh", "-c", "test $(cat /test) = dockerfilePath"]
},
]
TestBuildArgs: #up: [
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
ARG TEST=foo
RUN test "${TEST}" = "bar"
"""
buildArg: TEST: "bar"
},
]
// FIXME: this doesn't test anything beside not crashing
TestBuildLabels: #up: [
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
"""
label: FOO: "bar"
},
]
// FIXME: this doesn't test anything beside not crashing
TestBuildPlatform: #up: [
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
"""
platforms: ["linux/amd64"]
},
]
TestImageMetadata: #up: [
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
ENV CHECK foobar
ENV DOUBLECHECK test
"""
},
op.#Exec & {
args: ["sh", "-c", #"""
env
test "$CHECK" = "foobar"
"""#]
},
]
// Make sure the metadata is carried over with a `Load`
TestImageMetadataIndirect: #up: [
op.#Load & {
from: TestImageMetadata
},
op.#Exec & {
args: ["sh", "-c", #"""
env
test "$DOUBLECHECK" = "test"
"""#]
},
]

View File

@@ -1,3 +0,0 @@
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
COPY . /dir
RUN test $(cat /dir/foo) = foobar

View File

@@ -1,2 +0,0 @@
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
RUN echo dockerfilePath > /test

View File

@@ -1 +0,0 @@
foobar

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,13 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
#up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
args: ["echo", "always output"]
always: true
},
]

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

View File

@@ -1,16 +0,0 @@
package testing
import "alpha.dagger.io/dagger/op"
#up: [
op.#FetchContainer & {
ref: "alpine"
},
op.#Exec & {
args: ["sh", "-c", """
echo "pwd is: $(pwd)"
[ "$(pwd)" == "/thisisnonexistent" ] || exit 1
"""]
dir: "/thisisnonexistent"
},
]

View File

@@ -1 +0,0 @@
module: ""

View File

@@ -1,2 +0,0 @@
# dagger universe
alpha.dagger.io

Some files were not shown because too many files have changed in this diff Show More