Skip to content

Commit

Permalink
Better comments for authoring apim tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-p-smith committed Oct 11, 2023
1 parent 5db170b commit dbae3cc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions v2/internal/controllers/crd_apimanagement_20220801_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ func Test_ApiManagement_20220801_CRUD(t *testing.T) {
}

tc := globalTestContext.ForTest(t)
rg := tc.NewTestResourceGroup()

// If you don't want to delete the resource group at the end of the test as APIM
// takes a long time to provision; comment out the delete lines at the end of the test.
rg := tc.CreateTestResourceGroupAndWait()
// APIM takes a long time to provision. When you are authoring tests in this file. I
// recommend you change this line to CreateResourceAndWaitWithoutCleanup. This way
// apim will not be deleted until you have finished writing your tests. Also change
// the code below when you create the &service
tc.CreateResourceAndWait(rg)

// There will be a New v2 SKU released 5/10/2023 which will have a much quicker start up
// time. Move to that when it's available (BasicV2 or StandardV2 SKU)
Expand All @@ -52,6 +55,8 @@ func Test_ApiManagement_20220801_CRUD(t *testing.T) {
},
}

// APIM takes a long time to provision. When you are authoring tests in this file. I
// recommend you change this line to CreateResourceAndWaitWithoutCleanup.
tc.CreateResourcesAndWait(&service)

tc.Expect(service.Status.Id).ToNot(BeNil())
Expand Down

0 comments on commit dbae3cc

Please sign in to comment.