Skip to content

Commit

Permalink
Move servicebus receation test
Browse files Browse the repository at this point in the history
Add `Additive: true` because otherwise the second step fails with:

  error: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions

Seems to be related to a historic regression: pulumi/pulumi#12859
  • Loading branch information
danielrbradley committed Oct 4, 2023
1 parent c400939 commit cc1e50e
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 454 deletions.

This file was deleted.

79 changes: 0 additions & 79 deletions examples/azure-native-sdk-v2/go-servicebus-recreate/step1/go.mod

This file was deleted.

277 changes: 0 additions & 277 deletions examples/azure-native-sdk-v2/go-servicebus-recreate/step1/go.sum

This file was deleted.

40 changes: 0 additions & 40 deletions examples/azure-native-sdk-v2/go-servicebus-recreate/step1/main.go

This file was deleted.

40 changes: 0 additions & 40 deletions examples/azure-native-sdk-v2/go-servicebus-recreate/step2/main.go

This file was deleted.

15 changes: 0 additions & 15 deletions examples/examples_go_sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,6 @@ func TestAccAksGoSdk(t *testing.T) {
integration.ProgramTest(t, &test)
}

func TestServicebusRecreateSdk(t *testing.T) {
skipIfShort(t)
test := getGoBaseOptionsSdk(t, testDir(t, "go-servicebus-recreate", "step1")).
With(integration.ProgramTestOptions{
EditDirs: []integration.EditDir{
{
Dir: testDir(t, "go-servicebus-recreate", "step2"),
Additive: true,
},
},
})

integration.ProgramTest(t, &test)
}

func getGoBaseOptionsSdk(t *testing.T, dir string) integration.ProgramTestOptions {
base := getBaseOptions(t)

Expand Down
5 changes: 5 additions & 0 deletions provider/pkg/provider/provider_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ func TestApi(t *testing.T) {
runTestProgram(t, "api")
}

func TestServiceBusRecreate(t *testing.T) {
runTestProgram(t, "servicebus-recreate-1", "service-bus-recreate-2")
}

// runTestProgram runs an example from ./examples/<initialDir>
// Any editDirs are applied in order, and the program is run after each edit. e.g. ./examples/<editDir>
func runTestProgram(t *testing.T, initialDir string, editDirs ...string) {
Expand Down Expand Up @@ -70,6 +74,7 @@ func getTestOptions(initialDir string, editDirs []string, port int) (*integratio
for _, editDir := range editDirs {
test.EditDirs = append(test.EditDirs, integration.EditDir{
Dir: filepath.Join(cwd, "test-programs", editDir),
Additive: true,
})
}
return &test, nil
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: servicebus-recreate
runtime: yaml
description: Check servicebus auto-recreates on duplicate detection change
resources:
resourceGroup:
type: azure-native:resources:ResourceGroup
namespace:
type: azure-native:servicebus:Namespace
properties:
resourceGroupName: ${resourceGroup.name}
topic:
type: azure-native:servicebus:Topic
properties:
resourceGroupName: ${resourceGroup.name}
namespaceName: ${namespace.name}
requiresDuplicateDetection: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: servicebus-recreate
runtime: yaml
description: Check servicebus auto-recreates on duplicate detection change
resources:
resourceGroup:
type: azure-native:resources:ResourceGroup
namespace:
type: azure-native:servicebus:Namespace
properties:
resourceGroupName: ${resourceGroup.name}
topic:
type: azure-native:servicebus:Topic
properties:
resourceGroupName: ${resourceGroup.name}
namespaceName: ${namespace.name}
requiresDuplicateDetection: true # Changing this should trigger recreation otherwise will be rejected.

0 comments on commit cc1e50e

Please sign in to comment.