basic tests for alpine go and yarn
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
33
tests/stdlib/go/go.cue
Normal file
33
tests/stdlib/go/go.cue
Normal file
@@ -0,0 +1,33 @@
|
||||
package go
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/go"
|
||||
"dagger.io/alpine"
|
||||
)
|
||||
|
||||
TestData: dagger.#Dir
|
||||
|
||||
TestGoBuild: {
|
||||
build: go.#Build & {
|
||||
source: TestData
|
||||
output: "/bin/testbin"
|
||||
}
|
||||
|
||||
test: #dagger: compute: [
|
||||
dagger.#Load & {from: alpine.#Image},
|
||||
dagger.#Exec & {
|
||||
args: [
|
||||
"sh",
|
||||
"-ec",
|
||||
"""
|
||||
test "$(/bin/testbin)" = "hello world"
|
||||
""",
|
||||
]
|
||||
mount: "/bin/testbin": {
|
||||
from: build
|
||||
path: "/bin/testbin"
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
3
tests/stdlib/go/testdata/go.mod
vendored
Normal file
3
tests/stdlib/go/testdata/go.mod
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module main
|
||||
|
||||
go 1.14
|
7
tests/stdlib/go/testdata/main.go
vendored
Normal file
7
tests/stdlib/go/testdata/main.go
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("hello world")
|
||||
}
|
Reference in New Issue
Block a user