Skip to content

Commit cc1e50e

Browse files
Move servicebus receation test
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
1 parent c400939 commit cc1e50e

File tree

9 files changed

+37
-454
lines changed

9 files changed

+37
-454
lines changed

examples/azure-native-sdk-v2/go-servicebus-recreate/step1/Pulumi.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/azure-native-sdk-v2/go-servicebus-recreate/step1/go.mod

Lines changed: 0 additions & 79 deletions
This file was deleted.

examples/azure-native-sdk-v2/go-servicebus-recreate/step1/go.sum

Lines changed: 0 additions & 277 deletions
This file was deleted.

examples/azure-native-sdk-v2/go-servicebus-recreate/step1/main.go

Lines changed: 0 additions & 40 deletions
This file was deleted.

examples/azure-native-sdk-v2/go-servicebus-recreate/step2/main.go

Lines changed: 0 additions & 40 deletions
This file was deleted.

examples/examples_go_sdk_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,6 @@ func TestAccAksGoSdk(t *testing.T) {
6262
integration.ProgramTest(t, &test)
6363
}
6464

65-
func TestServicebusRecreateSdk(t *testing.T) {
66-
skipIfShort(t)
67-
test := getGoBaseOptionsSdk(t, testDir(t, "go-servicebus-recreate", "step1")).
68-
With(integration.ProgramTestOptions{
69-
EditDirs: []integration.EditDir{
70-
{
71-
Dir: testDir(t, "go-servicebus-recreate", "step2"),
72-
Additive: true,
73-
},
74-
},
75-
})
76-
77-
integration.ProgramTest(t, &test)
78-
}
79-
8065
func getGoBaseOptionsSdk(t *testing.T, dir string) integration.ProgramTestOptions {
8166
base := getBaseOptions(t)
8267

provider/pkg/provider/provider_e2e_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ func TestApi(t *testing.T) {
2929
runTestProgram(t, "api")
3030
}
3131

32+
func TestServiceBusRecreate(t *testing.T) {
33+
runTestProgram(t, "servicebus-recreate-1", "service-bus-recreate-2")
34+
}
35+
3236
// runTestProgram runs an example from ./examples/<initialDir>
3337
// Any editDirs are applied in order, and the program is run after each edit. e.g. ./examples/<editDir>
3438
func runTestProgram(t *testing.T, initialDir string, editDirs ...string) {
@@ -70,6 +74,7 @@ func getTestOptions(initialDir string, editDirs []string, port int) (*integratio
7074
for _, editDir := range editDirs {
7175
test.EditDirs = append(test.EditDirs, integration.EditDir{
7276
Dir: filepath.Join(cwd, "test-programs", editDir),
77+
Additive: true,
7378
})
7479
}
7580
return &test, nil
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: servicebus-recreate
2+
runtime: yaml
3+
description: Check servicebus auto-recreates on duplicate detection change
4+
resources:
5+
resourceGroup:
6+
type: azure-native:resources:ResourceGroup
7+
namespace:
8+
type: azure-native:servicebus:Namespace
9+
properties:
10+
resourceGroupName: ${resourceGroup.name}
11+
topic:
12+
type: azure-native:servicebus:Topic
13+
properties:
14+
resourceGroupName: ${resourceGroup.name}
15+
namespaceName: ${namespace.name}
16+
requiresDuplicateDetection: false
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: servicebus-recreate
2+
runtime: yaml
3+
description: Check servicebus auto-recreates on duplicate detection change
4+
resources:
5+
resourceGroup:
6+
type: azure-native:resources:ResourceGroup
7+
namespace:
8+
type: azure-native:servicebus:Namespace
9+
properties:
10+
resourceGroupName: ${resourceGroup.name}
11+
topic:
12+
type: azure-native:servicebus:Topic
13+
properties:
14+
resourceGroupName: ${resourceGroup.name}
15+
namespaceName: ${namespace.name}
16+
requiresDuplicateDetection: true # Changing this should trigger recreation otherwise will be rejected.

0 commit comments

Comments
 (0)