This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/stdlib/go/tests/go.cue
Tom Chauveau c99e39ec9c Move tests plan from dagger dir to universe
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-06-25 17:00:38 +02:00

34 lines
460 B
CUE

package go
import (
"dagger.io/dagger"
"dagger.io/alpine"
"dagger.io/dagger/op"
)
TestData: dagger.#Artifact @dagger(input)
TestGoBuild: {
build: #Build & {
source: TestData
output: "/bin/testbin"
}
test: #up: [
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: [
"sh",
"-ec",
"""
test "$(/bin/testbin)" = "hello world"
""",
]
mount: "/bin/testbin": {
from: build
path: "/bin/testbin"
}
},
]
}