basic tests for alpine go and yarn

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-02-24 19:18:24 -08:00
parent 256f373a52
commit 81cdccf541
7 changed files with 145 additions and 1 deletions

33
tests/stdlib/go/go.cue Normal file
View 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
View File

@@ -0,0 +1,3 @@
module main
go 1.14

7
tests/stdlib/go/testdata/main.go vendored Normal file
View File

@@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("hello world")
}