Skip to content

Commit

Permalink
Upgrade pulumi-terraform-bridge to v3.92.0 (#4628)
Browse files Browse the repository at this point in the history
This PR was generated via `$ upgrade-provider pulumi/pulumi-aws
--kind=bridge --pr-reviewers=iwahbe`.

---

- Upgrading pulumi-terraform-bridge from v3.91.1 to v3.92.0.
- Upgrading pulumi-terraform-bridge/pf from v0.44.1 to v0.45.0.

---------

Co-authored-by: Ian Wahbe <[email protected]>
  • Loading branch information
pulumi-bot and iwahbe authored Oct 11, 2024
1 parent 33382b7 commit cd0e3df
Show file tree
Hide file tree
Showing 799 changed files with 10,848 additions and 2,937 deletions.
26 changes: 13 additions & 13 deletions examples/examples_nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,10 @@ func TestRegress3421Update(t *testing.T) {
opttest.LocalProviderPath("aws", filepath.Join(getCwd(t), "..", "bin")),
)

test.SetConfig("listenerPort", "80")
test.Up()
test.SetConfig("listenerPort", "81")
test.Up()
test.SetConfig(t, "listenerPort", "80")
test.Up(t)
test.SetConfig(t, "listenerPort", "81")
test.Up(t)
}

func getJSBaseOptions(t *testing.T) integration.ProgramTestOptions {
Expand Down Expand Up @@ -619,22 +619,22 @@ func TestUpdateImportedLambda(t *testing.T) {
opttest.LocalProviderPath("aws", filepath.Join(getCwd(t), "..", "bin")),
)

test.SetConfig("runtime", "nodejs18.x")
res := test.Up()
test.SetConfig(t, "runtime", "nodejs18.x")
res := test.Up(t)
lambdaName := res.Outputs["lambda_name"]
lambdaRole := res.Outputs["lambda_role"]

secondStack := test.InstallStack("new_stack")
secondStack := test.InstallStack(t, "new_stack")

// Check that we can reimport the lambda.
secondStack.SetConfig("lambda_name", lambdaName.Value.(string))
secondStack.SetConfig("runtime", "nodejs18.x")
secondStack.SetConfig("lambda_role", lambdaRole.Value.(string))
secondStack.Up()
secondStack.SetConfig(t, "lambda_name", lambdaName.Value.(string))
secondStack.SetConfig(t, "runtime", "nodejs18.x")
secondStack.SetConfig(t, "lambda_role", lambdaRole.Value.(string))
secondStack.Up(t)

// Check that we can change a property on the lambda
secondStack.SetConfig("runtime", "nodejs16.x")
secondStack.Up()
secondStack.SetConfig(t, "runtime", "nodejs16.x")
secondStack.Up(t)
}

func TestNoCodeLambda(t *testing.T) {
Expand Down
9 changes: 5 additions & 4 deletions examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ package examples

import (
"context"
"io/ioutil"
"io"
"math/rand"
"net/http"
"os"
"testing"
"time"

testreplay "github.com/pulumi/providertest/replay"
pfbridge "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge"
testutils "github.com/pulumi/pulumi-terraform-bridge/testing/x"
"github.com/pulumi/pulumi/pkg/v3/testing/integration"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -66,7 +66,7 @@ func validateAPITest(isValid func(body string)) func(t *testing.T, stack integra
time.Sleep(10 * time.Second)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
assert.NoError(t, err)
isValid(string(body))
}
Expand All @@ -90,7 +90,8 @@ func replay(t *testing.T, sequence string) {
[]byte("{}"),
)(nil)
require.NoError(t, err)
testutils.ReplaySequence(t, p, sequence)

testreplay.ReplaySequence(t, p, sequence)
}

var letterRunes = []rune("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
Expand Down
14 changes: 7 additions & 7 deletions examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ require (
github.com/aws/aws-sdk-go v1.55.5
github.com/aws/aws-sdk-go-v2/config v1.27.39
github.com/aws/aws-sdk-go-v2/service/iam v1.36.3
github.com/pulumi/providertest v0.0.14
github.com/pulumi/providertest v0.1.2
github.com/pulumi/pulumi-aws/provider/v6 v6.0.0-00010101000000-000000000000
github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1
github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0
github.com/pulumi/pulumi-terraform-bridge/testing v0.0.2-0.20230927165309-e3fd9503f2d3
github.com/pulumi/pulumi/pkg/v3 v3.133.0
github.com/pulumi/pulumi/pkg/v3 v3.136.1
github.com/stretchr/testify v1.9.0
)

Expand Down Expand Up @@ -449,10 +449,10 @@ require (
github.com/pulumi/esc v0.10.0 // indirect
github.com/pulumi/inflector v0.1.1 // indirect
github.com/pulumi/pulumi-java/pkg v0.16.1 // indirect
github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1 // indirect
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect
github.com/pulumi/pulumi-yaml v1.10.0 // indirect
github.com/pulumi/pulumi/sdk/v3 v3.133.0 // indirect
github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0 // indirect
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10 // indirect
github.com/pulumi/pulumi-yaml v1.10.3 // indirect
github.com/pulumi/pulumi/sdk/v3 v3.136.1 // indirect
github.com/pulumi/schema-tools v0.1.2 // indirect
github.com/pulumi/terraform-diff-reader v0.0.2 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
Expand Down
28 changes: 14 additions & 14 deletions examples/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2440,24 +2440,24 @@ github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE=
github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c=
github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+SobA=
github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY=
github.com/pulumi/providertest v0.0.14 h1:5QlAPAAs82jkQraHsJvq1xgVfC7xtW8sFJwv2pHgxQ8=
github.com/pulumi/providertest v0.0.14/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0=
github.com/pulumi/providertest v0.1.2 h1:9pJS9MeNkMyGwyNeHmvh8QqLgJy39Nk2/ym5u7r13ng=
github.com/pulumi/providertest v0.1.2/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0=
github.com/pulumi/pulumi-java/pkg v0.16.1 h1:orHnDWFbpOERwaBLry9f+6nqPX7x0MsrIkaa5QDGAns=
github.com/pulumi/pulumi-java/pkg v0.16.1/go.mod h1:QH0DihZkWYle9XFc+LJ76m4hUo+fA3RdyaM90pqOaSM=
github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1 h1:39UPLBqbnvylm2heU/Rxa1+G++NZHdtW2Qg+hEhp5Wo=
github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1/go.mod h1:Zj4XBf+TuV3um7y82X3xk2yQiP+pnQ7YxMc4fq/rVVw=
github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0 h1:RIu3thoVfOR2yyyVS1xwuJ9ud05SPuXTf7Q+mnV6CQg=
github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0/go.mod h1:bcSV/ALzPJm4Ib1qS2rga27/O3DCGo2mV4XXGrcNfZE=
github.com/pulumi/pulumi-terraform-bridge/testing v0.0.2-0.20230927165309-e3fd9503f2d3 h1:bBWWeAtSPPYpKYlPZr2h0BiYgWQpHRIk0HO/MQmB+jc=
github.com/pulumi/pulumi-terraform-bridge/testing v0.0.2-0.20230927165309-e3fd9503f2d3/go.mod h1:vAQ7DeddebQ7FHdRaSG6ijuS28FS9PC4j8Y9wUuue0c=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1 h1:Twh0IKS1pGHP6LHDq1oR0vbHlV52asoUCC7spEJl3Ao=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1/go.mod h1:DvueDDtOIbf7W1Or4oH0o7F990ozp/ROmlm/vgLoe+g=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY=
github.com/pulumi/pulumi-yaml v1.10.0 h1:djbgMJCxJBmYMr4kOpAXH5iauxGohYjEuTLfxD3NUUI=
github.com/pulumi/pulumi-yaml v1.10.0/go.mod h1://lTvwHpgJ+WBKeMGiLrd/jinc4dl3eWV5LZ3G8iCfE=
github.com/pulumi/pulumi/pkg/v3 v3.133.0 h1:j1rd7ToLZIQc5H0427ISOXSbOIIemZ6B0MXtRhQ38Yg=
github.com/pulumi/pulumi/pkg/v3 v3.133.0/go.mod h1:JtMAnrsFIccO138WcMfPdhO0PioDukKihnZC0xTRLwo=
github.com/pulumi/pulumi/sdk/v3 v3.133.0 h1:o+7dbJZY9BVgAjOF5GYIWgjp/zpKAgWZwD4pPjUMXKQ=
github.com/pulumi/pulumi/sdk/v3 v3.133.0/go.mod h1:J5kQEX8v87aeUhk6NdQXnjCo1DbiOnOiL3Sf2DuDda8=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0 h1:LOUHyMFGYkchv4Bzej7v+1W1ooaspgQG6/oZVJ+3lXY=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0/go.mod h1:aI3U3eanRcyOX05No+Nk6FuJvppx4jjcQwFelHSI8yE=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10 h1:VAXmHuldKd760ZlMe6khXeJY0ccY3TJF1g1FnWGccaM=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10/go.mod h1:+AQS/2h775Chx1a4vxb7cDdyiOsdEw2Q6gD7K5QCIwI=
github.com/pulumi/pulumi-yaml v1.10.3 h1:j5cjPiE32ILmjrWnC1cfZ0MWdqCZ8fg9wlaWk7HOtM4=
github.com/pulumi/pulumi-yaml v1.10.3/go.mod h1:MFMQXkaUP5YQUKVJ6Z/aagZDl2f8hdU9oGaJfTcMf1Y=
github.com/pulumi/pulumi/pkg/v3 v3.136.1 h1:zA8aJZ7qI0QgZkBKjjQaYHEcigK6pZfrbfG38imXzWo=
github.com/pulumi/pulumi/pkg/v3 v3.136.1/go.mod h1:Iz8QIs07AbEdrO52hEIEM5C4VBDUYFH2NdM9u2xxBxY=
github.com/pulumi/pulumi/sdk/v3 v3.136.1 h1:VJWTgdBrLvvzIkMbGq/epNEfT65P9gTvw14UF/I7hTI=
github.com/pulumi/pulumi/sdk/v3 v3.136.1/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI=
github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo=
github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k=
github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI=
Expand Down
378 changes: 189 additions & 189 deletions provider/cmd/pulumi-resource-aws/schema.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
github.com/hashicorp/terraform-provider-aws v1.60.1-0.20220923175450-ca71523cdc36
github.com/mitchellh/go-homedir v1.1.0
github.com/pulumi/providertest v0.0.14
github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1
github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1
github.com/pulumi/pulumi/pkg/v3 v3.133.0
github.com/pulumi/pulumi/sdk/v3 v3.133.0
github.com/pulumi/providertest v0.1.2
github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0
github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0
github.com/pulumi/pulumi/pkg/v3 v3.136.1
github.com/pulumi/pulumi/sdk/v3 v3.136.1
github.com/stretchr/testify v1.9.0
pgregory.net/rapid v0.6.1
)
Expand Down Expand Up @@ -455,8 +455,8 @@ require (
github.com/pulumi/esc v0.10.0 // indirect
github.com/pulumi/inflector v0.1.1 // indirect
github.com/pulumi/pulumi-java/pkg v0.16.1 // indirect
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect
github.com/pulumi/pulumi-yaml v1.10.0 // indirect
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10 // indirect
github.com/pulumi/pulumi-yaml v1.10.3 // indirect
github.com/pulumi/schema-tools v0.1.2 // indirect
github.com/pulumi/terraform-diff-reader v0.0.2 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
Expand Down
28 changes: 14 additions & 14 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2440,22 +2440,22 @@ github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE=
github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c=
github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+SobA=
github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY=
github.com/pulumi/providertest v0.0.14 h1:5QlAPAAs82jkQraHsJvq1xgVfC7xtW8sFJwv2pHgxQ8=
github.com/pulumi/providertest v0.0.14/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0=
github.com/pulumi/providertest v0.1.2 h1:9pJS9MeNkMyGwyNeHmvh8QqLgJy39Nk2/ym5u7r13ng=
github.com/pulumi/providertest v0.1.2/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0=
github.com/pulumi/pulumi-java/pkg v0.16.1 h1:orHnDWFbpOERwaBLry9f+6nqPX7x0MsrIkaa5QDGAns=
github.com/pulumi/pulumi-java/pkg v0.16.1/go.mod h1:QH0DihZkWYle9XFc+LJ76m4hUo+fA3RdyaM90pqOaSM=
github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1 h1:39UPLBqbnvylm2heU/Rxa1+G++NZHdtW2Qg+hEhp5Wo=
github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1/go.mod h1:Zj4XBf+TuV3um7y82X3xk2yQiP+pnQ7YxMc4fq/rVVw=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1 h1:Twh0IKS1pGHP6LHDq1oR0vbHlV52asoUCC7spEJl3Ao=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1/go.mod h1:DvueDDtOIbf7W1Or4oH0o7F990ozp/ROmlm/vgLoe+g=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY=
github.com/pulumi/pulumi-yaml v1.10.0 h1:djbgMJCxJBmYMr4kOpAXH5iauxGohYjEuTLfxD3NUUI=
github.com/pulumi/pulumi-yaml v1.10.0/go.mod h1://lTvwHpgJ+WBKeMGiLrd/jinc4dl3eWV5LZ3G8iCfE=
github.com/pulumi/pulumi/pkg/v3 v3.133.0 h1:j1rd7ToLZIQc5H0427ISOXSbOIIemZ6B0MXtRhQ38Yg=
github.com/pulumi/pulumi/pkg/v3 v3.133.0/go.mod h1:JtMAnrsFIccO138WcMfPdhO0PioDukKihnZC0xTRLwo=
github.com/pulumi/pulumi/sdk/v3 v3.133.0 h1:o+7dbJZY9BVgAjOF5GYIWgjp/zpKAgWZwD4pPjUMXKQ=
github.com/pulumi/pulumi/sdk/v3 v3.133.0/go.mod h1:J5kQEX8v87aeUhk6NdQXnjCo1DbiOnOiL3Sf2DuDda8=
github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0 h1:RIu3thoVfOR2yyyVS1xwuJ9ud05SPuXTf7Q+mnV6CQg=
github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0/go.mod h1:bcSV/ALzPJm4Ib1qS2rga27/O3DCGo2mV4XXGrcNfZE=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0 h1:LOUHyMFGYkchv4Bzej7v+1W1ooaspgQG6/oZVJ+3lXY=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0/go.mod h1:aI3U3eanRcyOX05No+Nk6FuJvppx4jjcQwFelHSI8yE=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10 h1:VAXmHuldKd760ZlMe6khXeJY0ccY3TJF1g1FnWGccaM=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10/go.mod h1:+AQS/2h775Chx1a4vxb7cDdyiOsdEw2Q6gD7K5QCIwI=
github.com/pulumi/pulumi-yaml v1.10.3 h1:j5cjPiE32ILmjrWnC1cfZ0MWdqCZ8fg9wlaWk7HOtM4=
github.com/pulumi/pulumi-yaml v1.10.3/go.mod h1:MFMQXkaUP5YQUKVJ6Z/aagZDl2f8hdU9oGaJfTcMf1Y=
github.com/pulumi/pulumi/pkg/v3 v3.136.1 h1:zA8aJZ7qI0QgZkBKjjQaYHEcigK6pZfrbfG38imXzWo=
github.com/pulumi/pulumi/pkg/v3 v3.136.1/go.mod h1:Iz8QIs07AbEdrO52hEIEM5C4VBDUYFH2NdM9u2xxBxY=
github.com/pulumi/pulumi/sdk/v3 v3.136.1 h1:VJWTgdBrLvvzIkMbGq/epNEfT65P9gTvw14UF/I7hTI=
github.com/pulumi/pulumi/sdk/v3 v3.136.1/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI=
github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo=
github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k=
github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI=
Expand Down
36 changes: 18 additions & 18 deletions provider/provider_nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func TestRegress3094(t *testing.T) {
opttest.YarnLink("@pulumi/aws"),
}
test := pulumitest.NewPulumiTest(t, dir, options...)
upResult := test.Up()
upResult := test.Up(t)
t.Logf("#%v", upResult.Summary)
}

Expand All @@ -89,7 +89,7 @@ func TestRegress3835(t *testing.T) {
opttest.YarnLink("@pulumi/aws"),
}
test := pulumitest.NewPulumiTest(t, dir, options...)
result := test.Preview()
result := test.Preview(t)
t.Logf("#%v", result.ChangeSummary)
}

Expand All @@ -107,17 +107,17 @@ func TestChangingRegion(t *testing.T) {
t.Run("default provider", func(t *testing.T) {
test := pulumitest.NewPulumiTest(t, dir, options...)
for _, region := range []string{"us-east-1", "us-west-1"} {
test.SetConfig("aws:region", region)
res := test.Up()
test.SetConfig(t, "aws:region", region)
res := test.Up(t)
require.Equal(t, region, res.Outputs["actualRegion"].Value)
}
})

t.Run("explicit provider", func(t *testing.T) {
test := pulumitest.NewPulumiTest(t, dir, options...)
for _, region := range []string{"us-east-1", "us-west-1"} {
test.SetConfig("desired-region", region)
res := test.Up()
test.SetConfig(t, "desired-region", region)
res := test.Up(t)
require.Equal(t, region, res.Outputs["actualRegion"].Value)
}
})
Expand All @@ -135,7 +135,7 @@ func TestRegressAttributeMustBeWholeNumber(t *testing.T) {
opttest.YarnLink("@pulumi/aws"),
}
test := pulumitest.NewPulumiTest(t, dir, options...)
result := test.Preview()
result := test.Preview(t)
t.Logf("#%v", result.ChangeSummary)
}

Expand All @@ -152,8 +152,8 @@ func TestRegress4079(t *testing.T) {
}
test := pulumitest.NewPulumiTest(t, dir, options...)

test.SetConfig("targetGroupCount", "2")
r1 := test.Up()
test.SetConfig(t, "targetGroupCount", "2")
r1 := test.Up(t)
t.Logf("Stdout: %v", r1.StdOut)
t.Logf("Stderr: %v", r1.StdErr)

Expand All @@ -173,11 +173,11 @@ func TestRegress4079(t *testing.T) {
})
require.NoError(t, err)

rr := test.Refresh()
rr := test.Refresh(t)
t.Logf("Stdout: %v", rr.StdOut)
t.Logf("Stderr: %v", rr.StdErr)

refreshedState := test.ExportStack()
refreshedState := test.ExportStack(t)

type resource struct {
Type string `json:"type"`
Expand Down Expand Up @@ -251,11 +251,11 @@ func TestGameLift(t *testing.T) {
}

ptest := pulumiTest(t, filepath.Join("test-programs", "gamelift-typescript"))
ptest.SetConfig("customData", "A")
result1 := ptest.Up()
ptest.SetConfig(t, "customData", "A")
result1 := ptest.Up(t)
require.Equal(t, "A", result1.Outputs["CustomEventData"].Value)
ptest.SetConfig("customData", "B")
result2 := ptest.Up()
ptest.SetConfig(t, "customData", "B")
result2 := ptest.Up(t)
require.Equal(t, "B", result2.Outputs["CustomEventData"].Value)
}

Expand All @@ -270,9 +270,9 @@ func TestRegress4446(t *testing.T) {
opttest.YarnLink("@pulumi/aws"),
}
test := pulumitest.NewPulumiTest(t, dir, options...)
upResult := test.Up()
upResult := test.Up(t)
t.Logf("#%v", upResult.Summary)
result := test.Preview(optpreview.ExpectNoChanges())
result := test.Preview(t, optpreview.ExpectNoChanges())
t.Logf("#%v", result.ChangeSummary)
}

Expand All @@ -287,7 +287,7 @@ func TestRegress4568(t *testing.T) {
opttest.YarnLink("@pulumi/aws"),
}
test := pulumitest.NewPulumiTest(t, dir, options...)
upResult := test.Up()
upResult := test.Up(t)
t.Logf("#%v", upResult.Summary)

// The singular lifecyclePolicy should contain the first value
Expand Down
10 changes: 5 additions & 5 deletions provider/provider_python_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestRegress3887(t *testing.T) {
// Make sure that importing an AWS targetGroup succeeds.
func TestRegress2534(t *testing.T) {
ptest := pulumiTest(t, filepath.Join("test-programs", "regress-2534"))
upResult := ptest.Up()
upResult := ptest.Up(t)
targetGroupArn := upResult.Outputs["targetGroupArn"].Value.(string)
targetGroupUrn := upResult.Outputs["targetGroupUrn"].Value.(string)
workspace := ptest.CurrentStack().Workspace()
Expand All @@ -76,7 +76,7 @@ func TestRegress2534(t *testing.T) {

func TestRegress4457(t *testing.T) {
ptest := pulumiTest(t, filepath.Join("test-programs", "regress-4457"))
upResult := ptest.Up()
upResult := ptest.Up(t)
autoGroupArn := upResult.Outputs["autoGroupArn"].Value.(string)
autoGroupUrn := upResult.Outputs["autoGroupUrn"].Value.(string)
autoGroupName := upResult.Outputs["autoGroupName"].Value.(string)
Expand All @@ -86,20 +86,20 @@ func TestRegress4457(t *testing.T) {
workdir := workspace.WorkDir()
t.Logf("workdir = %s", workdir)

importResult := ptest.Import("aws:autoscaling/group:Group", "newag", autoGroupName, "" /* providerUrn */)
importResult := ptest.Import(t, "aws:autoscaling/group:Group", "newag", autoGroupName, "" /* providerUrn */)

t.Logf("Editing the program to add the code recommended by import")
i := strings.Index(importResult.Stdout, "import pulumi")
extraCode := importResult.Stdout[i:]
mainPy := filepath.Join(ptest.Source(), "__main__.py")
mainPy := filepath.Join(ptest.WorkingDir(), "__main__.py")
pyBytes, err := os.ReadFile(mainPy)
require.NoError(t, err)
updatedPyBytes := bytes.ReplaceAll(pyBytes, []byte("# EXTRA CODE HERE"), []byte(extraCode))
err = os.WriteFile(mainPy, updatedPyBytes, 0600)
require.NoError(t, err)

t.Logf("Previewing the edited program")
previewResult := ptest.Preview(optpreview.ExpectNoChanges())
previewResult := ptest.Preview(t, optpreview.ExpectNoChanges())
t.Logf("%s", previewResult.StdOut)
t.Logf("%s", previewResult.StdErr)
}
Expand Down
Loading

0 comments on commit cd0e3df

Please sign in to comment.