tests: ops: use proper imports

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-04-14 16:44:34 -07:00
parent 381db37ca3
commit 1f640d3e25
48 changed files with 325 additions and 357 deletions

View File

@@ -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
},

View File

@@ -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

View File

@@ -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

View File

@@ -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"
"""#]

View File

@@ -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

View File

@@ -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
"""]

View File

@@ -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"]
},
]

View File

@@ -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: "/"
},
]

View File

@@ -1,11 +1,11 @@
package testing
import "dagger.io/dagger/op"
#up: [
{
do: "fetch-container"
op.#FetchContainer & {
ref: "alpine"
},
{
do: "exec"
op.#Exec & {
},
]

View File

@@ -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"]
},
]

View File

@@ -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)

View File

@@ -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)

View File

@@ -1,12 +1,12 @@
package testing
import (
"dagger.io/dagger/op"
"dagger.io/def"
)
#up: [
{
do: "load",
op.#Load & {
from: def
},
]

View File

@@ -2,11 +2,11 @@ package testing
import (
"dagger.io/nonoptional"
"dagger.io/dagger/op"
)
#up: [
{
do: "load",
op.#Load & {
from: nonoptional
},
]

View File

@@ -2,11 +2,11 @@ package testing
import (
"dagger.io/optional"
"dagger.io/dagger/op"
)
#up: [
{
do: "load",
op.#Load & {
from: optional
},
]