tests: ops: use proper imports
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
11
tests/ops/mounts/valid/cache/main.cue
vendored
11
tests/ops/mounts/valid/cache/main.cue
vendored
@@ -1,23 +1,22 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
test: {
|
||||
string
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "load"
|
||||
op.#Load & {
|
||||
from: [{do: "fetch-container", ref: "alpine"}]
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
echo "NOT SURE WHAT TO TEST YET" > /out
|
||||
"""]
|
||||
dir: "/"
|
||||
mount: something: "cache"
|
||||
},
|
||||
{
|
||||
do: "export"
|
||||
op.#Export & {
|
||||
source: "/out"
|
||||
format: "string"
|
||||
},
|
||||
|
@@ -1,33 +1,34 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
test: {
|
||||
string
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "load"
|
||||
from: [{do: "fetch-container", ref: "alpine"}]
|
||||
op.#Load & {
|
||||
from: [
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
cat /mnt/test/lol > /out
|
||||
"""]
|
||||
mount: "/mnt/test": from: #up: [
|
||||
{
|
||||
do: "fetch-container"
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
echo -n "hello world" > /lol
|
||||
"""]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
do: "export"
|
||||
op.#Export & {
|
||||
source: "/out"
|
||||
format: "string"
|
||||
},
|
||||
|
@@ -1,19 +1,22 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
test: {
|
||||
string
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "load"
|
||||
from: [{do: "fetch-container", ref: "alpine"}]
|
||||
op.#Load & {
|
||||
from: [
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
ls -lA /lol > /out
|
||||
"""]
|
||||
dir: "/"
|
||||
mount: something: {
|
||||
input: [{
|
||||
do: "fetch-container"
|
||||
@@ -22,8 +25,7 @@ test: {
|
||||
path: "/lol"
|
||||
}
|
||||
},
|
||||
{
|
||||
do: "export"
|
||||
op.#Export & {
|
||||
source: "/out"
|
||||
format: "string"
|
||||
},
|
||||
|
@@ -1,32 +1,33 @@
|
||||
package testing
|
||||
|
||||
import "dagger.io/dagger/op"
|
||||
|
||||
test: {
|
||||
string
|
||||
|
||||
#up: [
|
||||
{
|
||||
do: "load"
|
||||
from: [{do: "fetch-container", ref: "alpine"}]
|
||||
op.#Load & {
|
||||
from: [
|
||||
op.#FetchContainer & {
|
||||
ref: "alpine"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
echo ok > /out
|
||||
echo ok > /tmpdir/out
|
||||
"""]
|
||||
dir: "/"
|
||||
mount: "/tmpdir": "tmpfs"
|
||||
},
|
||||
{
|
||||
do: "exec"
|
||||
op.#Exec & {
|
||||
args: ["sh", "-c", """
|
||||
[ -f /out ] || exit 1
|
||||
# content of /cache/tmp must not exist in this layer
|
||||
[ ! -f /tmpdir/out ] || exit 1
|
||||
"""]
|
||||
},
|
||||
{
|
||||
do: "export"
|
||||
op.#Export & {
|
||||
source: "/out"
|
||||
format: "string"
|
||||
},
|
||||
|
Reference in New Issue
Block a user