Can someone point me to an integration testing exa...
# python
w
Can someone point me to an integration testing example other than in go ? , Pulumi 2.0 supports multi language integration testing as per documentation ?
l
The integration testing framework is implemented in go, but supports running stacks authored in any language. See this example that tests a typescript program https://github.com/pulumi/examples/tree/master/testing-integration
w
Ok , so the integration test itself should be written in go ?
@lemon-agent-27707 So I am getting error: --yes must be passed in to proceed when running in non-interactive mode
When running an integration test
Does this have anything to do with upgrading to 2.0 ?
l
w
Copy code
func TestExamples(t *testing.T) {
	awsRegion := os.Getenv("AWS_REGION")
	if awsRegion == "" {
		awsRegion = "us-west-2"
	}

	cwd, _ := os.Getwd()
	integration.ProgramTest(t, &integration.ProgramTestOptions{
		Quick:       true,
		SkipRefresh: true,
		Dir:         path.Join(cwd, "..", "..", "network"),
		Config: map[string]string{
			"aws:region": awsRegion,
		},
		UpdateCommandlineFlags: []string{"--non-interactive", "--yes"},
		StackName:              "dev",
	})

	
}
I had to do this to get it to work
UpdateCommandlineFlags: []string{"--non-interactive", "--yes"}
This is my go.mod
Copy code
module pulumi/integration_tests

go 1.14


require (
	<http://github.com/Azure/go-autorest|github.com/Azure/go-autorest> v12.2.0+incompatible
	<http://github.com/pulumi/pulumi|github.com/pulumi/pulumi> v1.12.0
    
)
l
That version is about ~2 months old. Have you tried v2?
<http://github.com/pulumi/pulumi/pkg/v2|github.com/pulumi/pulumi/pkg/v2> v2.0.0