Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 4 additions & 4 deletions examples/examples_nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"context"
"encoding/json"
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
Expand Down Expand Up @@ -433,6 +432,7 @@ func TestParameterizeApiVersion(t *testing.T) {
pt := pulumitest.NewPulumiTest(t,
filepath.Join(cwd, "parameterize"),
opttest.YarnLink("@pulumi/azure-native"),
opttest.LocalProviderPath("azure-native", getProviderBinPath(t)),
)
pt.SetConfig(t, "azure-native:location", location)

Expand Down Expand Up @@ -469,10 +469,10 @@ func pulumiPackageAdd(t *testing.T, pt *pulumitest.PulumiTest, args ...string) {
if _, debugMode := os.LookupEnv("PULUMI_DEBUG_PROVIDERS"); debugMode {
provider = "azure-native"
} else {
providerBinaryPath, err := exec.LookPath("pulumi-resource-azure-native")
require.NoError(t, err)
provider, err = filepath.Abs(providerBinaryPath)
binPath := getProviderBinPath(t)
providerBinPath, err := filepath.Abs(filepath.Join(binPath, "pulumi-resource-azure-native"))
require.NoError(t, err)
provider = providerBinPath
}

runPulumiPackageAdd(t, pt, provider, args...)
Expand Down
15 changes: 10 additions & 5 deletions examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ func getLocation(t *testing.T) string {

func getBaseOptions(t *testing.T) integration.ProgramTestOptions {
azureLocation := getLocation(t)
binPath, err := filepath.Abs("../bin")
if err != nil {
t.Fatal(err)
}
fmt.Printf("Using binPath %s\n", binPath)
binPath := getProviderBinPath(t)
return integration.ProgramTestOptions{
ExpectRefreshChanges: true,
RequireEmptyPreviewAfterRefresh: true,
Expand All @@ -45,6 +41,15 @@ func getBaseOptions(t *testing.T) integration.ProgramTestOptions {
}
}

func getProviderBinPath(t *testing.T) string {
binPath, err := filepath.Abs("../bin")
if err != nil {
t.Fatal(err)
}
fmt.Printf("Using binPath %s\n", binPath)
return binPath
}

func getCwd(t *testing.T) string {
cwd, err := os.Getwd()
if err != nil {
Expand Down
Loading
Loading