Move tests plan from dagger dir to universe
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
33
stdlib/go/tests/go.cue
Normal file
33
stdlib/go/tests/go.cue
Normal file
@@ -0,0 +1,33 @@
|
||||
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"
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user