stdlib: rename dagger.io/llb to dagger.io/dagger/op

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-04-06 00:27:51 +00:00
parent 7fb90790f3
commit 6673ae69b3
26 changed files with 143 additions and 143 deletions

View File

@@ -2,14 +2,14 @@ package test
import (
"dagger.io/dagger"
"dagger.io/llb"
"dagger.io/dagger/op"
)
// Set to `--input-dir=./tests/dockerbuild/testdata`
TestData: dagger.#Artifact
TestInlinedDockerfile: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
RUN echo hello world
@@ -18,51 +18,51 @@ TestInlinedDockerfile: #up: [
]
TestOpChaining: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
RUN echo foobar > /output
"""
},
llb.#Exec & {
op.#Exec & {
args: ["sh", "-c", "test $(cat /output) = foobar"]
},
]
TestBuildContext: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
context: TestData
},
llb.#Exec & {
op.#Exec & {
args: ["sh", "-c", "test $(cat /dir/foo) = foobar"]
},
]
TestBuildContextAndDockerfile: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
context: TestData
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
COPY foo /override
"""
},
llb.#Exec & {
op.#Exec & {
args: ["sh", "-c", "test $(cat /override) = foobar"]
},
]
TestDockerfilePath: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
context: TestData
dockerfilePath: "./dockerfilepath/Dockerfile.custom"
},
llb.#Exec & {
op.#Exec & {
args: ["sh", "-c", "test $(cat /test) = dockerfilePath"]
},
]
TestBuildArgs: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
ARG TEST=foo
@@ -74,7 +74,7 @@ TestBuildArgs: #up: [
// FIXME: this doesn't test anything beside not crashing
TestBuildLabels: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
"""
@@ -84,7 +84,7 @@ TestBuildLabels: #up: [
// FIXME: this doesn't test anything beside not crashing
TestBuildPlatform: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
"""

View File

@@ -1,7 +1,7 @@
package main
import (
"dagger.io/llb"
"dagger.io/dagger/op"
"dagger.io/alpine"
)
@@ -10,11 +10,11 @@ TestPushContainer: {
random: {
string
#up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: ["sh", "-c", "echo -n $RANDOM > /rand"]
},
llb.#Export & {
op.#Export & {
source: "/rand"
},
]
@@ -24,11 +24,11 @@ TestPushContainer: {
push: {
ref: "daggerio/ci-test:\(random)"
#up: [
llb.#WriteFile & {
op.#WriteFile & {
content: random
dest: "/rand"
},
llb.#PushContainer & {
op.#PushContainer & {
"ref": ref
},
]
@@ -36,15 +36,15 @@ TestPushContainer: {
// Pull the image back
pull: #up: [
llb.#FetchContainer & {
op.#FetchContainer & {
ref: push.ref
},
]
// Check the content
check: #up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: [
"sh", "-c", #"""
test "$(cat /src/rand)" = "\#(random)"