Skip to content

Commit

Permalink
Fix SB test race
Browse files Browse the repository at this point in the history
  • Loading branch information
matthchr committed Oct 3, 2023
1 parent 166551f commit 7de8ed5
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ func Test_ServiceBus_Namespace_Basic_v1api20210101preview_CRUD(t *testing.T) {
ServiceBus_Queue_v1api20210101preview_CRUD(tc, namespace)
},
},
)

// This must run at the end as it modifies the namespace
tc.RunSubtests(
testcommon.Subtest{
Name: "Namespace secrets",
Test: func(tc *testcommon.KubePerTestContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ func Test_ServiceBus_Namespace_Basic_v1api20211101_CRUD(t *testing.T) {
ServiceBus_Queue_v1api20211101_CRUD(tc, namespace)
},
},
)

// This must run at the end as it modifies the namespace
tc.RunSubtests(
testcommon.Subtest{
Name: "Namespace secrets",
Test: func(tc *testcommon.KubePerTestContext) { ServiceBus_Namespace_Secrets_v1api20211101(tc, namespace) },
Test: func(tc *testcommon.KubePerTestContext) {
ServiceBus_Namespace_Secrets_v1api20211101(tc, namespace)
},
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@ func Test_ServiceBus_Namespace_Basic_v1api20221001preview_CRUD(t *testing.T) {
ServiceBus_NamespacesQueue_v1api20221001preview_CRUD(tc, namespace)
},
},
)

// This must run at the end as it modifies the namespace
tc.RunSubtests(
testcommon.Subtest{
Name: "Namespace secrets",
Test: func(tc *testcommon.KubePerTestContext) {
ServiceBus_Namespace_Secrets_v1api20221001preview(tc, namespace)
},
},
)
})

tc.DeleteResourceAndWait(namespace)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ func Test_ServiceBus_Namespace_Standard_v1api20210101preview_CRUD(t *testing.T)
ServiceBus_NamespacesAuthorizationRule_v1api20210101preview_CRUD(tc, namespace)
},
},
)

// This must run at the end as it modifies the namespace
tc.RunSubtests(
testcommon.Subtest{
Name: "NamespaceSecrets CRUD",
Test: func(tc *testcommon.KubePerTestContext) {
ServiceBus_Namespace_Secrets_v1api20210101preview(tc, namespace)
},
},
)
})

tc.DeleteResourceAndWait(namespace)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func Test_ServiceBus_Namespace_Standard_v1api20211101_CRUD(t *testing.T) {
ServiceBus_NamespacesAuthorizationRule_v1api20211101_CRUD(tc, namespace)
},
},
)

// This must run at the end as it modifies the namespace
tc.RunSubtests(
testcommon.Subtest{
Name: "NamespaceSecrets CRUD",
Test: func(tc *testcommon.KubePerTestContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ func Test_ServiceBus_Namespace_Standard_v1api20221001preview_CRUD(t *testing.T)
ServiceBus_AuthorizationRule_v1api20221001preview_CRUD(tc, namespace)
},
},
)

// This must run at the end as it modifies the namespace.
tc.RunSubtests(
testcommon.Subtest{
Name: "NamespaceSecrets CRUD",
Test: func(tc *testcommon.KubePerTestContext) {
ServiceBus_Namespace_Secrets_v1api20221001preview(tc, namespace)
},
},
)
})

tc.DeleteResourceAndWait(namespace)

Expand Down

0 comments on commit 7de8ed5

Please sign in to comment.