Skip to content

Commit

Permalink
Revert "Non-idempotent SNS topic creation workaround (#3235)" (#3272)
Browse files Browse the repository at this point in the history
This reverts commit 976def3.

Until we sort out
#3268 (comment)

It hasn't been released so no need to patch it.
  • Loading branch information
VenelinMartinov committed Jan 17, 2024
1 parent 8e8813d commit 6050193
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 353 deletions.
46 changes: 0 additions & 46 deletions patches/0037-Non-idempotent-sns-topic-creation.patch

This file was deleted.

2 changes: 1 addition & 1 deletion provider/go.mod
Expand Up @@ -8,7 +8,7 @@ require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.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.5
github.com/pulumi/providertest v0.0.3
github.com/pulumi/pulumi-terraform-bridge/pf v0.23.0
github.com/pulumi/pulumi-terraform-bridge/v3 v3.70.0
github.com/pulumi/pulumi/pkg/v3 v3.99.0
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Expand Up @@ -2417,8 +2417,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE=
github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw=
github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k=
github.com/pulumi/providertest v0.0.5 h1:+NQXBudDWSGmSEU6zgh/Bb6sXzv4e8hDVp2n2Tu/GvM=
github.com/pulumi/providertest v0.0.5/go.mod h1:fwGDI/khKruoumzTOisCLooJwJT20OvYHcKMkIsfTCk=
github.com/pulumi/providertest v0.0.3 h1:DLcAvVGgeP4mHEi1Ftk5zTX9QHjcrO6u5w5GCZrF99s=
github.com/pulumi/providertest v0.0.3/go.mod h1:kZYBA14iemv3X4G4xsBKaa72zVbn//IyL5HTYKpLuy0=
github.com/pulumi/pulumi-java/pkg v0.9.8 h1:c8mYsalnRXA2Ibgvv6scefOn6mW1Vb0UT0mcDqjsivQ=
github.com/pulumi/pulumi-java/pkg v0.9.8/go.mod h1:c6rSw/+q4O0IImgJ9axxoC6QesbPYWBaG5gimbHouUQ=
github.com/pulumi/pulumi-terraform-bridge/pf v0.23.0 h1:j0rOtgpeGn2ZfyEVJtg5QhCEQEiMgz0rmFO6qWUFLzA=
Expand Down
43 changes: 0 additions & 43 deletions provider/provider_yaml_test.go
Expand Up @@ -6,15 +6,10 @@
package provider

import (
"math/rand"
"os"
"path/filepath"
"testing"

"github.com/pulumi/providertest"
"github.com/pulumi/providertest/pulumitest"
"github.com/pulumi/providertest/pulumitest/opttest"
"github.com/stretchr/testify/require"
)

func TestBucket(t *testing.T) {
Expand Down Expand Up @@ -89,41 +84,3 @@ func TestKmsKey(t *testing.T) {
func TestSecretsManagerSecret(t *testing.T) {
test(t, filepath.Join("test-programs", "secretsmanager-secret"))
}

var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")

func randSeq(n int) string {
b := make([]rune, n)
for i := range b {
b[i] = letters[rand.Intn(len(letters))]
}
return string(b)
}

func pulumiTest(t *testing.T, dir string) *pulumitest.PulumiTest {
if testing.Short() {
t.Skipf("Skipping in testing.Short() mode, assuming this is a CI run without AWS creds")
return nil
}
cwd, err := os.Getwd()
if err != nil {
t.Error(err)
}
ptest := pulumitest.NewPulumiTest(t, dir,
opttest.LocalProviderPath("aws", filepath.Join(cwd, "..", "bin")),
)

return ptest
}

func TestNonIdempotentSnsTopic(t *testing.T) {
ptest := pulumiTest(t, filepath.Join("test-programs", "non-idempotent-sns-topic"))

ptest.InstallStack("test")
// generate random name
topic_name := randSeq(12)
ptest.SetConfig("snsTopicName", topic_name)

_, err := ptest.CurrentStack().Up(ptest.Context())
require.ErrorContains(t, err, "already exists")
}
14 changes: 0 additions & 14 deletions provider/test-programs/non-idempotent-sns-topic/Pulumi.yaml

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 6050193

Please sign in to comment.