tests: fixed invalid test

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-03-31 18:10:20 -07:00
parent ac5c8417d2
commit 3aec0337d2
2 changed files with 9 additions and 10 deletions

View File

@ -69,7 +69,6 @@ var queryCmd = &cobra.Command{
lg.Fatal().Err(err).Msg("failed to lookup source") lg.Fatal().Err(err).Msg("failed to lookup source")
} }
output.IsConcreteR()
fmt.Println(string(out)) fmt.Println(string(out))
}, },
} }

View File

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