Skip to content

Commit

Permalink
Make go tests run out of the box (#1949)
Browse files Browse the repository at this point in the history
Go tests require a magic env var to run, this PR sets it by default in
the go base options.
  • Loading branch information
VenelinMartinov committed Apr 24, 2024
1 parent a1f7885 commit e4e4ef0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/examples_go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ func TestPulumiLabelsSecretGo(t *testing.T) {
}

func getGoBaseOptions(t *testing.T) integration.ProgramTestOptions {
if os.Getenv("PULUMI_GO_DEP_ROOT") == "" {
depRoot := getCwd(t) + "/../../"
err := os.Setenv("PULUMI_GO_DEP_ROOT", depRoot)
require.NoError(t, err)
}
base := getBaseOptions(t)
goBase := base.With(integration.ProgramTestOptions{
Dependencies: []string{
Expand Down

0 comments on commit e4e4ef0

Please sign in to comment.