I am getting the below error after adding a simple...
# golang
I am getting the below error after adding a simple integration test from the docs:
Copy code
func TestVpc(t *testing.T) {
	awsRegion := "us-east-1"
	cwd, _ := os.Getwd()

	integration.ProgramTest(t, &integration.ProgramTestOptions{
		Quick:       true,
		SkipRefresh: true,
		Dir:         path.Join(cwd, "..", "..", "aep-base-infra"),
		Config: map[string]string{
			"aws:region": awsRegion,
Copy code
➜ resources (main) ✗ go test ./...
panic: proto: duplicate enum registered: pulumirpc.EnforcementLevel

goroutine 1 [running]:
<http://github.com/golang/protobuf/proto.RegisterEnum({0x101cb7b88|github.com/golang/protobuf/proto.RegisterEnum({0x101cb7b88>, 0x1a}, 0x14000359a10?, 0x140003599e0?)
	/Users/dinesh.auti/go/pkg/mod/github.com/golang/protobuf@v1.4.3/proto/registry.go:104 +0xb8
	/Users/dinesh.auti/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.25.2/proto/go/analyzer.pb.go:963 +0x44
exit status 2
FAIL	<http://github.com/aetion/aep-base-infra/internal/resources|github.com/aetion/aep-base-infra/internal/resources>	0.393s
Has anyone seen this before? I am using Pulumi version 3.35.1
Upgrading the version to v3 solved the issue.
Copy code
go get <http://github.com/pulumi/pulumi/pkg/v3/testing/integration|github.com/pulumi/pulumi/pkg/v3/testing/integration>
Tip: always make sure that the Pulumi packages come from the same version, otherwise you have the chance that the code tries to register the protobufs spec more than once. I bumped into a similar issue myself earlier this week and learned a thing or two about the protobuf lib in go: https://github.com/pact-foundation/pact-plugins/issues/4
👍 1