1
1
mirror of https://github.com/mcuadros/ascode synced 2024-11-26 14:03:49 +01:00
ascode/starlark/module/docker/image_test.go

29 lines
586 B
Go
Raw Permalink Normal View History

package docker
import (
"testing"
"github.com/qri-io/starlib/testdata"
"go.starlark.net/resolve"
"go.starlark.net/starlark"
"go.starlark.net/starlarktest"
)
func TestImage(t *testing.T) {
resolve.AllowFloat = true
2020-03-29 11:20:08 +02:00
resolve.AllowLambda = true
thread := &starlark.Thread{Load: testdata.NewLoader(LoadModule, ModuleName)}
starlarktest.SetReporter(thread, t)
// Execute test file
_, err := starlark.ExecFile(thread, "testdata/test.star", nil, nil)
if err != nil {
if ee, ok := err.(*starlark.EvalError); ok {
t.Error(ee.Backtrace())
} else {
t.Error(err)
}
}
}