tests: ops: use proper imports
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["echo", "always output"]
|
||||
always: true
|
||||
},
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
echo "pwd is: $(pwd)"
|
||||
[ "$(pwd)" == "/thisisnonexistent" ] || exit 1
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
echo "pwd is: $(pwd)"
|
||||
[ "$(pwd)" == "/etc" ] || exit 1
|
||||
|
8
tests/ops/exec/env/invalid/main.cue
vendored
8
tests/ops/exec/env/invalid/main.cue
vendored
@@ -1,12 +1,12 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", #"""
|
||||
echo "$foo"
|
||||
"""#]
|
||||
|
8
tests/ops/exec/env/overlay/main.cue
vendored
8
tests/ops/exec/env/overlay/main.cue
vendored
@@ -1,14 +1,14 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
bar: string
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
echo "foo: $foo"
|
||||
[ "$foo" == "overlay environment" ] || exit 1
|
||||
|
7
tests/ops/exec/env/valid/main.cue
vendored
7
tests/ops/exec/env/valid/main.cue
vendored
@@ -1,12 +1,13 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
#up: [
|
||||
{
|
||||
op.#FetchContainer & {
|
||||
do: "fetch-container"
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
[ "$foo" == "output environment" ] || exit 1
|
||||
"""]
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["erroringout"]
|
||||
},
|
||||
]
|
||||
|
@@ -1,14 +1,12 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", "exit 123"]
|
||||
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
|
||||
dir: "/"
|
||||
},
|
||||
]
|
||||
|
@@ -1,11 +1,11 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
},
|
||||
]
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["echo", "simple output"]
|
||||
},
|
||||
]
|
||||
|
@@ -1,15 +1,15 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
hello: "world"
|
||||
bar: string
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
dir: "/"
|
||||
args: ["sh", "-c", """
|
||||
echo \(hello)
|
||||
|
@@ -1,15 +1,15 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
hello: "world"
|
||||
bar: string
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
dir: "/"
|
||||
args: ["sh", "-c", """
|
||||
echo \(bar)
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package testing
|
||||
|
||||
import (
|
||||
"dagger.io/dagger/op"
|
||||
"dagger.io/def"
|
||||
)
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "load",
|
||||
op.#Load & {
|
||||
from: def
|
||||
},
|
||||
]
|
||||
|
@@ -2,11 +2,11 @@ package testing
|
||||
|
||||
import (
|
||||
"dagger.io/nonoptional"
|
||||
"dagger.io/dagger/op"
|
||||
)
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "load",
|
||||
op.#Load & {
|
||||
from: nonoptional
|
||||
},
|
||||
]
|
||||
|
@@ -2,11 +2,11 @@ package testing
|
||||
|
||||
import (
|
||||
"dagger.io/optional"
|
||||
"dagger.io/dagger/op"
|
||||
)
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "load",
|
||||
op.#Load & {
|
||||
from: optional
|
||||
},
|
||||
]
|
||||
|
Reference in New Issue
Block a user