From dbae3cc0a749e8f4f62b2d3f31af4626ed879b81 Mon Sep 17 00:00:00 2001 From: ross-p-smith Date: Wed, 11 Oct 2023 22:19:58 +0100 Subject: [PATCH] Better comments for authoring apim tests --- .../controllers/crd_apimanagement_20220801_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/v2/internal/controllers/crd_apimanagement_20220801_test.go b/v2/internal/controllers/crd_apimanagement_20220801_test.go index c152b68ea8c..1650fa685d2 100644 --- a/v2/internal/controllers/crd_apimanagement_20220801_test.go +++ b/v2/internal/controllers/crd_apimanagement_20220801_test.go @@ -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) @@ -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())