Skip to content

Commit

Permalink
Get test working
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Oct 14, 2022
1 parent fde08cc commit 48b929e
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/integration/integration_go_smoke_test.go
Expand Up @@ -94,31 +94,28 @@ func TestConstructGo(t *testing.T) {
{Package: "testprovider", Path: buildTestProvider(t, filepath.Join("..", "testprovider"))},
{Package: "testcomponent", Path: filepath.Join(testDir, test.componentDir)},
}
integration.ProgramTest(t, optsForConstructGo(t, test.expectedResourceCount, localProviders, test.env...))
integration.ProgramTest(t, optsForConstructGo(t, testDir, test.expectedResourceCount, localProviders, test.env...))
})
}
}

// Test remote component construction in Go.
func TestNestedConstructGo(t *testing.T) {
t.Parallel()

parentDir := "construct_component"
testDir := "construct_nested_component"
testDir := "construct_component"
runComponentSetup(t, testDir)

localProviders :=
[]integration.LocalDependency{
{Package: "testprovider", Path: buildTestProvider(t, filepath.Join("..", "testprovider"))},
{Package: "testcomponent", Path: filepath.Join(parentDir, "construct_component")},
{Package: "testcomponent", Path: filepath.Join(testDir, "testcomponent-go")},
{Package: "secondtestcomponent", Path: filepath.Join(testDir, "testcomponent2-go")}}
integration.ProgramTest(t, optsForConstructGo(t, 18, localProviders))
integration.ProgramTest(t, optsForConstructGo(t, "construct_nested_component", 18, localProviders))
}

func optsForConstructGo(t *testing.T, expectedResourceCount int, localProviders []integration.LocalDependency, env ...string) *integration.ProgramTestOptions {
func optsForConstructGo(t *testing.T, dir string, expectedResourceCount int, localProviders []integration.LocalDependency, env ...string) *integration.ProgramTestOptions {
return &integration.ProgramTestOptions{
Env: env,
Dir: filepath.Join("construct_component", "go"),
Dir: filepath.Join(dir, "go"),
Dependencies: []string{
"github.com/pulumi/pulumi/sdk/v3",
},
Expand Down

0 comments on commit 48b929e

Please sign in to comment.