pulumi/examples/examples_test.go
joeduffy 2f4d7a9789 Run integration tests
This change runs the examples integration tests for every test
run.  They used to be split out because the AWS tests take so long,
but now those are in their own separate package.  Running the
integration tests here more frequently will prevent breaking the
most basic Lumi CLI commands and capabilities.
2017-08-06 08:26:20 -07:00

36 lines
685 B
Go

// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
package examples
import (
"os"
"path"
"testing"
"github.com/stretchr/testify/assert"
"github.com/pulumi/pulumi-fabric/pkg/testing/integration"
)
func TestExamples(t *testing.T) {
cwd, err := os.Getwd()
if !assert.NoError(t, err, "expected a valid working directory: %v", err) {
return
}
examples := []integration.LumiProgramTestOptions{
{
Dir: path.Join(cwd, "basic/minimal"),
Dependencies: []string{
"@lumi/lumirt",
"@lumi/lumi",
},
},
}
for _, ex := range examples {
example := ex
t.Run(example.Dir, func(t *testing.T) {
integration.LumiProgramTest(t, example)
})
}
}