diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimapis_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimapis_live_test.go index c476283d3bc6..e53faaad8989 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimapis_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimapis_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -46,21 +47,21 @@ func (testsuite *ApimapisTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.operationId = testutil.GenerateAlphaNumericID(testsuite.T(), "operationi", 6) - testsuite.apiId = testutil.GenerateAlphaNumericID(testsuite.T(), "apiid", 6) - testsuite.attachmentId = testutil.GenerateAlphaNumericID(testsuite.T(), "attachment", 6) - testsuite.commentId = testutil.GenerateAlphaNumericID(testsuite.T(), "commentid", 6) - testsuite.diagnosticId = testutil.GenerateAlphaNumericID(testsuite.T(), "diagnostic", 6) - testsuite.issueId = testutil.GenerateAlphaNumericID(testsuite.T(), "issueid", 6) - testsuite.releaseId = testutil.GenerateAlphaNumericID(testsuite.T(), "releaseid", 6) - testsuite.schemaId = testutil.GenerateAlphaNumericID(testsuite.T(), "schemaid", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicenam", 6) - testsuite.tagDescriptionId = testutil.GenerateAlphaNumericID(testsuite.T(), "tagdescrip", 6) - testsuite.tagId = testutil.GenerateAlphaNumericID(testsuite.T(), "tagid", 6) - testsuite.tagOperationId = testutil.GenerateAlphaNumericID(testsuite.T(), "tagoperation", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.operationId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "operationi", 16, false) + testsuite.apiId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "apiid", 10, false) + testsuite.attachmentId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "attachment", 16, false) + testsuite.commentId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "commentid", 15, false) + testsuite.diagnosticId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "diagnostic", 16, false) + testsuite.issueId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "issueid", 13, false) + testsuite.releaseId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "releaseid", 15, false) + testsuite.schemaId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "schemaid", 14, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicenam", 16, false) + testsuite.tagDescriptionId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "tagdescrip", 16, false) + testsuite.tagId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "tagid", 11, false) + testsuite.tagOperationId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "tagoperation", 18, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimapiversionsets_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimapiversionsets_live_test.go index b1d5f06490d1..a68d44a7da15 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimapiversionsets_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimapiversionsets_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimapiversionsetsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "serviceapiversionsets", 6) - testsuite.versionSetId = testutil.GenerateAlphaNumericID(testsuite.T(), "versionset", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceapiversionsets", 27, false) + testsuite.versionSetId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "versionset", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimauthorizationservers_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimauthorizationservers_live_test.go index 0eb6cd57e51c..d443c67da8d4 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimauthorizationservers_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimauthorizationservers_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimauthorizationserversTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.authsid = testutil.GenerateAlphaNumericID(testsuite.T(), "authsid", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "serviceauth", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.authsid, _ = recording.GenerateAlphaNumericID(testsuite.T(), "authsid", 13, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceauth", 17, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimcaches_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimcaches_live_test.go index e95c3d9d6b04..5b2dc0709a44 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimcaches_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimcaches_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimcachesTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.cacheId = testutil.GenerateAlphaNumericID(testsuite.T(), "cacheid", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicecache", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.cacheId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "cacheid", 13, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicecache", 18, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimdeployment_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimdeployment_live_test.go index d7a143aa6292..cd94e583670c 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimdeployment_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimdeployment_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -35,10 +36,10 @@ func (testsuite *ApimdeploymentTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicedeploy", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicedeploy", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimgateways_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimgateways_live_test.go index 0562093518c5..02e23783de38 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimgateways_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimgateways_live_test.go @@ -16,6 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -39,12 +40,12 @@ func (testsuite *ApimgatewaysTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.gatewayId = testutil.GenerateAlphaNumericID(testsuite.T(), "gatewayid", 6) - testsuite.hcId = testutil.GenerateAlphaNumericID(testsuite.T(), "hcid", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicegateway", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.gatewayId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "gatewayid", 15, false) + testsuite.hcId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "hcid", 10, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicegateway", 20, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimgroups_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimgroups_live_test.go index 1aee1313b3fd..a7e88cf30d9b 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimgroups_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimgroups_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimgroupsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.groupId = testutil.GenerateAlphaNumericID(testsuite.T(), "groupid", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicegroup", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.groupId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "groupid", 13, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicegroup", 18, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimidentityprovider_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimidentityprovider_live_test.go index d5e643e88df3..6428cf609f0f 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimidentityprovider_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimidentityprovider_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -38,13 +39,13 @@ func (testsuite *ApimidentityproviderTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "serviceidentity", 6) - testsuite.azureClientId = testutil.GetEnv("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") - testsuite.azureClientSecret = testutil.GetEnv("AZURE_CLIENT_SECRET", "000000000000") - testsuite.azureTenantId = testutil.GetEnv("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceidentity", 21, false) + testsuite.azureClientId = recording.GetEnvVariable("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + testsuite.azureClientSecret = recording.GetEnvVariable("AZURE_CLIENT_SECRET", "000000000000") + testsuite.azureTenantId = recording.GetEnvVariable("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimnamedvalues_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimnamedvalues_live_test.go index 2246c040dd4c..0ab642cb93e5 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimnamedvalues_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimnamedvalues_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimnamedvaluesTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.namedValueId = testutil.GenerateAlphaNumericID(testsuite.T(), "namedvalue", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicenamed", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.namedValueId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namedvalue", 16, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicenamed", 18, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimnotifications_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimnotifications_live_test.go index 1a7f655233ca..84d32039330a 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimnotifications_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimnotifications_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -37,12 +38,12 @@ func (testsuite *ApimnotificationsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.email = testutil.GenerateAlphaNumericID(testsuite.T(), "email", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicenotifi", 6) - testsuite.userId = testutil.GenerateAlphaNumericID(testsuite.T(), "userid", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.email, _ = recording.GenerateAlphaNumericID(testsuite.T(), "email", 11, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicenotifi", 19, false) + testsuite.userId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "userid", 12, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimopenidconnectproviders_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimopenidconnectproviders_live_test.go index cc379d30ab73..cda50e9ecb21 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimopenidconnectproviders_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimopenidconnectproviders_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimopenidconnectprovidersTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.opid = testutil.GenerateAlphaNumericID(testsuite.T(), "opid", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "serviceopenid", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.opid, _ = recording.GenerateAlphaNumericID(testsuite.T(), "opid", 10, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceopenid", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimpolicies_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimpolicies_live_test.go index e881f01fc417..73ad7c78ee24 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimpolicies_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimpolicies_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -35,10 +36,10 @@ func (testsuite *ApimpoliciesTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicepolicy", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicepolicy", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimportalrevisions_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimportalrevisions_live_test.go index 98eb7cb92188..8958b79d3c8c 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimportalrevisions_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimportalrevisions_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimportalrevisionsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.portalRevisionId = testutil.GenerateAlphaNumericID(testsuite.T(), "portalrevi", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicerevision", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.portalRevisionId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "portalrevi", 16, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicerevision", 21, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimportalsettings_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimportalsettings_live_test.go index abd82a49a5f2..ad3db3eac9e7 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimportalsettings_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimportalsettings_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -35,10 +36,10 @@ func (testsuite *ApimportalsettingsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicesetting", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicesetting", 20, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimprivatelink_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimprivatelink_live_test.go index ad1ad356640e..f40d2fb86306 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimprivatelink_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimprivatelink_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -39,12 +40,12 @@ func (testsuite *ApimprivatelinkTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.privateEndpointConnectionName = testutil.GenerateAlphaNumericID(testsuite.T(), "apimprivateendpoint", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "serviceprivate", 6) - testsuite.virtualNetworksName = testutil.GenerateAlphaNumericID(testsuite.T(), "apimvnet", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.privateEndpointConnectionName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "apimprivateendpoint", 25, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceprivate", 20, false) + testsuite.virtualNetworksName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "apimvnet", 14, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimproducts_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimproducts_live_test.go index 06ca6d07e92d..4e415c1d94c1 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimproducts_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimproducts_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -39,14 +40,14 @@ func (testsuite *ApimproductsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.apiId = testutil.GenerateAlphaNumericID(testsuite.T(), "productapiid", 6) - testsuite.groupId = testutil.GenerateAlphaNumericID(testsuite.T(), "productgroupid", 6) - testsuite.productId = testutil.GenerateAlphaNumericID(testsuite.T(), "productid", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "serviceproduct", 6) - testsuite.tagId = testutil.GenerateAlphaNumericID(testsuite.T(), "producttagid", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.apiId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "productapiid", 18, false) + testsuite.groupId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "productgroupid", 20, false) + testsuite.productId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "productid", 15, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceproduct", 20, false) + testsuite.tagId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "producttagid", 18, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimreports_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimreports_live_test.go index cd677444262a..5deb6d8fc260 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimreports_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimreports_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -35,10 +36,10 @@ func (testsuite *ApimreportsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicereports", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicereports", 20, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimschema_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimschema_live_test.go index 435544642773..be834f331e27 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimschema_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimschema_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimschemaTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.schemaId = testutil.GenerateAlphaNumericID(testsuite.T(), "globalschemaid", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "serviceschema", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.schemaId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "globalschemaid", 20, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceschema", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimsubscriptions_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimsubscriptions_live_test.go index 5c4471553e18..dd00f89e1ecf 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimsubscriptions_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimsubscriptions_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -38,12 +39,12 @@ func (testsuite *ApimsubscriptionsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.productId = testutil.GenerateAlphaNumericID(testsuite.T(), "subproductid", 6) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicesub", 6) - testsuite.sid = testutil.GenerateAlphaNumericID(testsuite.T(), "sid", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.productId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "subproductid", 18, false) + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicesub", 16, false) + testsuite.sid, _ = recording.GenerateAlphaNumericID(testsuite.T(), "sid", 9, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimtags_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimtags_live_test.go index a75e0bf264ea..41c4d74b77ce 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimtags_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimtags_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimtagsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicetags", 6) - testsuite.tagId = testutil.GenerateAlphaNumericID(testsuite.T(), "tagsid", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicetags", 17, false) + testsuite.tagId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "tagsid", 12, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimtenant_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimtenant_live_test.go index a59a80666fa5..d1d21b022b06 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimtenant_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimtenant_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -35,10 +36,10 @@ func (testsuite *ApimtenantTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "servicetenant", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "servicetenant", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/apimusers_live_test.go b/sdk/resourcemanager/apimanagement/armapimanagement/apimusers_live_test.go index 52e2d9773586..b7bab179ea20 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/apimusers_live_test.go +++ b/sdk/resourcemanager/apimanagement/armapimanagement/apimusers_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -36,11 +37,11 @@ func (testsuite *ApimusersTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/apimanagement/armapimanagement/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceName = testutil.GenerateAlphaNumericID(testsuite.T(), "serviceuser", 6) - testsuite.userId = testutil.GenerateAlphaNumericID(testsuite.T(), "userid", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceuser", 17, false) + testsuite.userId, _ = recording.GenerateAlphaNumericID(testsuite.T(), "userid", 12, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/assets.json b/sdk/resourcemanager/apimanagement/armapimanagement/assets.json index 3e88867a994a..4dd1ba3fbf13 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/assets.json +++ b/sdk/resourcemanager/apimanagement/armapimanagement/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/apimanagement/armapimanagement", - "Tag": "go/resourcemanager/apimanagement/armapimanagement_6cd9744850" + "Tag": "go/resourcemanager/apimanagement/armapimanagement_038009015c" } diff --git a/sdk/resourcemanager/apimanagement/armapimanagement/go.mod b/sdk/resourcemanager/apimanagement/armapimanagement/go.mod index 3f21557f083b..3a2c5cc0e16d 100644 --- a/sdk/resourcemanager/apimanagement/armapimanagement/go.mod +++ b/sdk/resourcemanager/apimanagement/armapimanagement/go.mod @@ -5,13 +5,13 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.7.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnaeon/go-vcr v1.1.0 // indirect diff --git a/sdk/resourcemanager/cdn/armcdn/afdx_live_test.go b/sdk/resourcemanager/cdn/armcdn/afdx_live_test.go index e80a99a2da53..aae6a9547569 100644 --- a/sdk/resourcemanager/cdn/armcdn/afdx_live_test.go +++ b/sdk/resourcemanager/cdn/armcdn/afdx_live_test.go @@ -16,6 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -45,17 +46,17 @@ func (testsuite *AfdxTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.customDomainName = testutil.GenerateAlphaNumericID(testsuite.T(), "afdcustomdoma", 6) - testsuite.endpointName = testutil.GenerateAlphaNumericID(testsuite.T(), "afdendpointna", 6) - testsuite.originGroupName = testutil.GenerateAlphaNumericID(testsuite.T(), "afdorigingrou", 6) - testsuite.originName = testutil.GenerateAlphaNumericID(testsuite.T(), "afdoriginname", 6) - testsuite.profileName = testutil.GenerateAlphaNumericID(testsuite.T(), "afdprofilenam", 6) - testsuite.routeName = testutil.GenerateAlphaNumericID(testsuite.T(), "routename", 6) - testsuite.ruleName = testutil.GenerateAlphaNumericID(testsuite.T(), "rulename", 6) - testsuite.ruleSetName = testutil.GenerateAlphaNumericID(testsuite.T(), "rulesetnam", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.customDomainName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "afdcustomdoma", 19, false) + testsuite.endpointName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "afdendpointna", 19, false) + testsuite.originGroupName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "afdorigingrou", 19, false) + testsuite.originName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "afdoriginname", 19, false) + testsuite.profileName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "afdprofilenam", 19, false) + testsuite.routeName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "routename", 15, false) + testsuite.ruleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "rulename", 14, false) + testsuite.ruleSetName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "rulesetnam", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/cdn/armcdn/assets.json b/sdk/resourcemanager/cdn/armcdn/assets.json index 75409217a37a..9fd8f66b360f 100644 --- a/sdk/resourcemanager/cdn/armcdn/assets.json +++ b/sdk/resourcemanager/cdn/armcdn/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/cdn/armcdn", - "Tag": "go/resourcemanager/cdn/armcdn_99fb79facf" + "Tag": "go/resourcemanager/cdn/armcdn_230f5f561c" } diff --git a/sdk/resourcemanager/cdn/armcdn/cdn_live_test.go b/sdk/resourcemanager/cdn/armcdn/cdn_live_test.go index 9cf849fba6b8..4d6d505b0c75 100644 --- a/sdk/resourcemanager/cdn/armcdn/cdn_live_test.go +++ b/sdk/resourcemanager/cdn/armcdn/cdn_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -40,14 +41,14 @@ func (testsuite *CdnTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.customDomainName = testutil.GenerateAlphaNumericID(testsuite.T(), "customdoma", 6) - testsuite.endpointName = testutil.GenerateAlphaNumericID(testsuite.T(), "endpointna", 6) - testsuite.originGroupName = testutil.GenerateAlphaNumericID(testsuite.T(), "origingrou", 6) - testsuite.originName = testutil.GenerateAlphaNumericID(testsuite.T(), "originname", 6) - testsuite.profileName = testutil.GenerateAlphaNumericID(testsuite.T(), "profilenam", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.customDomainName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "customdoma", 16, false) + testsuite.endpointName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "endpointna", 16, false) + testsuite.originGroupName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "origingrou", 16, false) + testsuite.originName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "originname", 16, false) + testsuite.profileName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "profilenam", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/cdn/armcdn/go.mod b/sdk/resourcemanager/cdn/armcdn/go.mod index a9f4aa030108..120efd1f04e5 100644 --- a/sdk/resourcemanager/cdn/armcdn/go.mod +++ b/sdk/resourcemanager/cdn/armcdn/go.mod @@ -5,12 +5,12 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/stretchr/testify v1.7.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/sdk/resourcemanager/cdn/armcdn/go.sum b/sdk/resourcemanager/cdn/armcdn/go.sum index 6e2c77825a2c..57a48677bc2c 100644 --- a/sdk/resourcemanager/cdn/armcdn/go.sum +++ b/sdk/resourcemanager/cdn/armcdn/go.sum @@ -2,8 +2,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= diff --git a/sdk/resourcemanager/containerregistry/armcontainerregistry/assets.json b/sdk/resourcemanager/containerregistry/armcontainerregistry/assets.json index 1145f2dc3f04..9164699f4ab9 100644 --- a/sdk/resourcemanager/containerregistry/armcontainerregistry/assets.json +++ b/sdk/resourcemanager/containerregistry/armcontainerregistry/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/containerregistry/armcontainerregistry", - "Tag": "go/resourcemanager/containerregistry/armcontainerregistry_d44bee1a8e" + "Tag": "go/resourcemanager/containerregistry/armcontainerregistry_3829c8ffd6" } diff --git a/sdk/resourcemanager/containerregistry/armcontainerregistry/containerregistry_build_live_test.go b/sdk/resourcemanager/containerregistry/armcontainerregistry/containerregistry_build_live_test.go index f3216fa8bab4..8dfbcac57655 100644 --- a/sdk/resourcemanager/containerregistry/armcontainerregistry/containerregistry_build_live_test.go +++ b/sdk/resourcemanager/containerregistry/armcontainerregistry/containerregistry_build_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -38,13 +39,13 @@ func (testsuite *ContainerregistryBuildTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/containerregistry/armcontainerregistry/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.agentPoolName = testutil.GenerateAlphaNumericID(testsuite.T(), "agentpooln", 6) - testsuite.registryName = testutil.GenerateAlphaNumericID(testsuite.T(), "registryna2", 6) - testsuite.taskName = testutil.GenerateAlphaNumericID(testsuite.T(), "taskname", 6) - testsuite.taskRunName = testutil.GenerateAlphaNumericID(testsuite.T(), "taskrunnam", 6) - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.agentPoolName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "agentpooln", 16, false) + testsuite.registryName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "registryna2", 17, false) + testsuite.taskName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "taskname", 14, false) + testsuite.taskRunName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "taskrunnam", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/containerregistry/armcontainerregistry/containerregistry_live_test.go b/sdk/resourcemanager/containerregistry/armcontainerregistry/containerregistry_live_test.go index 599b2c5f456f..7b045a1029ed 100644 --- a/sdk/resourcemanager/containerregistry/armcontainerregistry/containerregistry_live_test.go +++ b/sdk/resourcemanager/containerregistry/armcontainerregistry/containerregistry_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/stretchr/testify/suite" @@ -43,16 +44,16 @@ func (testsuite *ContainerregistryTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/containerregistry/armcontainerregistry/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.exportPipelineName = testutil.GenerateAlphaNumericID(testsuite.T(), "exportpipe", 6) - testsuite.importPipelineName = testutil.GenerateAlphaNumericID(testsuite.T(), "importpipe", 6) - testsuite.registryName = testutil.GenerateAlphaNumericID(testsuite.T(), "registryna", 6) - testsuite.replicationName = testutil.GenerateAlphaNumericID(testsuite.T(), "replicatio", 6) - testsuite.scopeMapName = testutil.GenerateAlphaNumericID(testsuite.T(), "scopemapna", 6) - testsuite.tokenName = testutil.GenerateAlphaNumericID(testsuite.T(), "tokenname", 6) - testsuite.webhookName = testutil.GenerateAlphaNumericID(testsuite.T(), "webhooknam", 6) - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.exportPipelineName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "exportpipe", 16, false) + testsuite.importPipelineName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "importpipe", 16, false) + testsuite.registryName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "registryna", 16, false) + testsuite.replicationName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "replicatio", 16, false) + testsuite.scopeMapName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "scopemapna", 16, false) + testsuite.tokenName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "tokenname", 19, false) + testsuite.webhookName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "webhooknam", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/datafactory/armdatafactory/datafactory_live_test.go b/sdk/resourcemanager/datafactory/armdatafactory/datafactory_live_test.go index a22511006cca..693a9a868486 100644 --- a/sdk/resourcemanager/datafactory/armdatafactory/datafactory_live_test.go +++ b/sdk/resourcemanager/datafactory/armdatafactory/datafactory_live_test.go @@ -3,8 +3,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. package armdatafactory_test diff --git a/sdk/resourcemanager/datalake-store/armdatalakestore/account_live_test.go b/sdk/resourcemanager/datalake-store/armdatalakestore/account_live_test.go index 8b63f18c5734..35946d834f74 100644 --- a/sdk/resourcemanager/datalake-store/armdatalakestore/account_live_test.go +++ b/sdk/resourcemanager/datalake-store/armdatalakestore/account_live_test.go @@ -3,8 +3,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. package armdatalakestore_test diff --git a/sdk/resourcemanager/eventgrid/armeventgrid/assets.json b/sdk/resourcemanager/eventgrid/armeventgrid/assets.json index 23c6f75dcf73..8c5e6e48b195 100644 --- a/sdk/resourcemanager/eventgrid/armeventgrid/assets.json +++ b/sdk/resourcemanager/eventgrid/armeventgrid/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/eventgrid/armeventgrid", - "Tag": "go/resourcemanager/eventgrid/armeventgrid_ed9ca0e7cd" + "Tag": "go/resourcemanager/eventgrid/armeventgrid_b2276859e2" } diff --git a/sdk/resourcemanager/eventgrid/armeventgrid/eventgrid_live_test.go b/sdk/resourcemanager/eventgrid/armeventgrid/eventgrid_live_test.go index 8622024f2546..04daebc99804 100644 --- a/sdk/resourcemanager/eventgrid/armeventgrid/eventgrid_live_test.go +++ b/sdk/resourcemanager/eventgrid/armeventgrid/eventgrid_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -49,19 +50,19 @@ func (testsuite *EventGridTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.domainName = testutil.GenerateAlphaNumericID(testsuite.T(), "domainname", 6) - testsuite.domainTopicName = testutil.GenerateAlphaNumericID(testsuite.T(), "domaintopi", 6) - testsuite.eventSubscriptionName = testutil.GenerateAlphaNumericID(testsuite.T(), "eventsubsc", 6) - testsuite.namespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "eventhubna", 6) - testsuite.partnerNamespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "partnernam", 6) - testsuite.partnerRegistrationName = testutil.GenerateAlphaNumericID(testsuite.T(), "partnerreg", 6) - testsuite.privateEndpointName = testutil.GenerateAlphaNumericID(testsuite.T(), "eventgridprivateendpoint", 6) - testsuite.systemTopicName = testutil.GenerateAlphaNumericID(testsuite.T(), "systemtopi", 6) - testsuite.topicName = testutil.GenerateAlphaNumericID(testsuite.T(), "topicname", 6) - testsuite.virtualNetworksName = testutil.GenerateAlphaNumericID(testsuite.T(), "eventgridvnet", 6) - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.domainName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "domainname", 16, false) + testsuite.domainTopicName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "domaintopi", 16, false) + testsuite.eventSubscriptionName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "eventsubsc", 16, false) + testsuite.namespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "eventhubna", 16, false) + testsuite.partnerNamespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "partnernam", 16, false) + testsuite.partnerRegistrationName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "partnerreg", 16, false) + testsuite.privateEndpointName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "eventgridprivateendpoint", 30, false) + testsuite.systemTopicName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "systemtopi", 16, false) + testsuite.topicName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "topicname", 15, false) + testsuite.virtualNetworksName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "eventgridvnet", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/eventgrid/armeventgrid/go.mod b/sdk/resourcemanager/eventgrid/armeventgrid/go.mod index bf4967ce3a03..0d5d5486a777 100644 --- a/sdk/resourcemanager/eventgrid/armeventgrid/go.mod +++ b/sdk/resourcemanager/eventgrid/armeventgrid/go.mod @@ -5,13 +5,13 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.7.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnaeon/go-vcr v1.1.0 // indirect diff --git a/sdk/resourcemanager/eventgrid/armeventgrid/go.sum b/sdk/resourcemanager/eventgrid/armeventgrid/go.sum index 6e2c77825a2c..57a48677bc2c 100644 --- a/sdk/resourcemanager/eventgrid/armeventgrid/go.sum +++ b/sdk/resourcemanager/eventgrid/armeventgrid/go.sum @@ -2,8 +2,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= diff --git a/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_live_test.go b/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_live_test.go index 0d88b84d568f..d66c8950abd4 100644 --- a/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_live_test.go +++ b/sdk/resourcemanager/eventhub/armeventhub/privateendpointconnections_live_test.go @@ -3,8 +3,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. package armeventhub_test diff --git a/sdk/resourcemanager/mariadb/armmariadb/mariadb_live_test.go b/sdk/resourcemanager/mariadb/armmariadb/mariadb_live_test.go index 6b03a40c6d16..4d7444b803f3 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/mariadb_live_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/mariadb_live_test.go @@ -3,8 +3,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. package armmariadb_test diff --git a/sdk/resourcemanager/mariadb/armmariadb/performancerecommendations_live_test.go b/sdk/resourcemanager/mariadb/armmariadb/performancerecommendations_live_test.go index 11a5c3df13e1..8c4ce0a86a3c 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/performancerecommendations_live_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/performancerecommendations_live_test.go @@ -3,8 +3,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. package armmariadb_test diff --git a/sdk/resourcemanager/mariadb/armmariadb/privateendpointconnections_live_test.go b/sdk/resourcemanager/mariadb/armmariadb/privateendpointconnections_live_test.go index 29975a479bc1..9484f1815870 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/privateendpointconnections_live_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/privateendpointconnections_live_test.go @@ -3,8 +3,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. package armmariadb_test diff --git a/sdk/resourcemanager/mariadb/armmariadb/serversecurityalertpolicies_live_test.go b/sdk/resourcemanager/mariadb/armmariadb/serversecurityalertpolicies_live_test.go index 638533ae5147..adc731d1a69c 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/serversecurityalertpolicies_live_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/serversecurityalertpolicies_live_test.go @@ -3,8 +3,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. package armmariadb_test diff --git a/sdk/resourcemanager/monitor/armmonitor/actiongroups_live_test.go b/sdk/resourcemanager/monitor/armmonitor/actiongroups_live_test.go index c0870e087427..571aa35fdddf 100644 --- a/sdk/resourcemanager/monitor/armmonitor/actiongroups_live_test.go +++ b/sdk/resourcemanager/monitor/armmonitor/actiongroups_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/stretchr/testify/suite" @@ -35,10 +36,10 @@ func (testsuite *ActiongroupsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/monitor/armmonitor/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.actionGroupName = testutil.GenerateAlphaNumericID(testsuite.T(), "actiongroupna", 6) - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.actionGroupName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "actiongroupna", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/monitor/armmonitor/activitylogalerts_live_test.go b/sdk/resourcemanager/monitor/armmonitor/activitylogalerts_live_test.go index 36f8a839be06..45e4ccd6cc71 100644 --- a/sdk/resourcemanager/monitor/armmonitor/activitylogalerts_live_test.go +++ b/sdk/resourcemanager/monitor/armmonitor/activitylogalerts_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/stretchr/testify/suite" @@ -35,10 +36,10 @@ func (testsuite *ActivitylogalertsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/monitor/armmonitor/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.activityLogAlertName = testutil.GenerateAlphaNumericID(testsuite.T(), "activitylogalertna", 6) - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.activityLogAlertName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "activitylogalertna", 24, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/monitor/armmonitor/assets.json b/sdk/resourcemanager/monitor/armmonitor/assets.json index 0aa410f69260..23aad853d29b 100644 --- a/sdk/resourcemanager/monitor/armmonitor/assets.json +++ b/sdk/resourcemanager/monitor/armmonitor/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/monitor/armmonitor", - "Tag": "go/resourcemanager/monitor/armmonitor_acc12373a4" + "Tag": "go/resourcemanager/monitor/armmonitor_9e08720799" } diff --git a/sdk/resourcemanager/monitor/armmonitor/autoscale_live_test.go b/sdk/resourcemanager/monitor/armmonitor/autoscale_live_test.go index f0a221d867c6..31a1acb817c0 100644 --- a/sdk/resourcemanager/monitor/armmonitor/autoscale_live_test.go +++ b/sdk/resourcemanager/monitor/armmonitor/autoscale_live_test.go @@ -16,6 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -41,11 +42,11 @@ func (testsuite *AutoscaleTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/monitor/armmonitor/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.autoscaleSettingName = testutil.GenerateAlphaNumericID(testsuite.T(), "autoscalesettingna", 6) - testsuite.adminPassword = testutil.GetEnv("ADMIN_PASSWORD", "000000000000") - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.autoscaleSettingName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "autoscalesettingna", 24, false) + testsuite.adminPassword = recording.GetEnvVariable("ADMIN_PASSWORD", "000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/monitor/armmonitor/datacollectionendpoints_live_test.go b/sdk/resourcemanager/monitor/armmonitor/datacollectionendpoints_live_test.go index 210e41980943..0d2e6446bebb 100644 --- a/sdk/resourcemanager/monitor/armmonitor/datacollectionendpoints_live_test.go +++ b/sdk/resourcemanager/monitor/armmonitor/datacollectionendpoints_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/stretchr/testify/suite" @@ -35,10 +36,10 @@ func (testsuite *DatacollectionendpointsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/monitor/armmonitor/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.dataCollectionEndpointName = testutil.GenerateAlphaNumericID(testsuite.T(), "datacollectionendpointna", 6) - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.dataCollectionEndpointName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "datacollectionendpointna", 30, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/monitor/armmonitor/datacollectionrules_live_test.go b/sdk/resourcemanager/monitor/armmonitor/datacollectionrules_live_test.go index b62bce01c19b..c429c173ff41 100644 --- a/sdk/resourcemanager/monitor/armmonitor/datacollectionrules_live_test.go +++ b/sdk/resourcemanager/monitor/armmonitor/datacollectionrules_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -41,13 +42,13 @@ func (testsuite *DatacollectionrulesTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/monitor/armmonitor/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.dataCollectionRuleName = testutil.GenerateAlphaNumericID(testsuite.T(), "datacollectionrulena", 6) - testsuite.managedClustersName = testutil.GenerateAlphaNumericID(testsuite.T(), "associationaks", 6) - testsuite.azureClientId = testutil.GetEnv("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") - testsuite.azureClientSecret = testutil.GetEnv("AZURE_CLIENT_SECRET", "000000000000") - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.dataCollectionRuleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "datacollectionrulena", 26, false) + testsuite.managedClustersName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "associationaks", 20, false) + testsuite.azureClientId = recording.GetEnvVariable("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + testsuite.azureClientSecret = recording.GetEnvVariable("AZURE_CLIENT_SECRET", "000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/monitor/armmonitor/go.mod b/sdk/resourcemanager/monitor/armmonitor/go.mod index fbc114480431..49291be171b0 100644 --- a/sdk/resourcemanager/monitor/armmonitor/go.mod +++ b/sdk/resourcemanager/monitor/armmonitor/go.mod @@ -5,13 +5,13 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.7.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnaeon/go-vcr v1.1.0 // indirect diff --git a/sdk/resourcemanager/monitor/armmonitor/logprofiles_live_test.go b/sdk/resourcemanager/monitor/armmonitor/logprofiles_live_test.go index 8065e6fb0d18..7d4974758137 100644 --- a/sdk/resourcemanager/monitor/armmonitor/logprofiles_live_test.go +++ b/sdk/resourcemanager/monitor/armmonitor/logprofiles_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -38,9 +39,9 @@ func (testsuite *LogprofilesTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) testsuite.storageAccountName = "monitorsana" - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/monitor/armmonitor/metricalerts_live_test.go b/sdk/resourcemanager/monitor/armmonitor/metricalerts_live_test.go index 4bc744ae5816..3d0266160195 100644 --- a/sdk/resourcemanager/monitor/armmonitor/metricalerts_live_test.go +++ b/sdk/resourcemanager/monitor/armmonitor/metricalerts_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -40,11 +41,11 @@ func (testsuite *MetricalertsTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/monitor/armmonitor/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.ruleName = testutil.GenerateAlphaNumericID(testsuite.T(), "metricalertna", 6) - testsuite.adminPassword = testutil.GetEnv("ADMIN_PASSWORD", "000000000000") - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.ruleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "metricalertna", 19, false) + testsuite.adminPassword = recording.GetEnvVariable("ADMIN_PASSWORD", "000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/monitor/armmonitor/privatelinkscopes_live_test.go b/sdk/resourcemanager/monitor/armmonitor/privatelinkscopes_live_test.go index 96a596e0608f..7b8e25d8a749 100644 --- a/sdk/resourcemanager/monitor/armmonitor/privatelinkscopes_live_test.go +++ b/sdk/resourcemanager/monitor/armmonitor/privatelinkscopes_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/stretchr/testify/suite" @@ -35,10 +36,10 @@ func (testsuite *PrivatelinkscopesTestSuite) SetupSuite() { testutil.StartRecording(testsuite.T(), "sdk/resourcemanager/monitor/armmonitor/testdata") testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.scopeName = testutil.GenerateAlphaNumericID(testsuite.T(), "linkscopena", 6) - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.scopeName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "linkscopena", 17, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_live_test.go b/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_live_test.go index cd9c345701af..c24016659e5d 100644 --- a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *ApplicationGatewayWafDynamicManifestsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/applicationsecuritygroup_live_test.go b/sdk/resourcemanager/network/armnetwork/applicationsecuritygroup_live_test.go index 1105c5ecdb57..d9d24f8b216d 100644 --- a/sdk/resourcemanager/network/armnetwork/applicationsecuritygroup_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/applicationsecuritygroup_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *ApplicationSecurityGroupTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.applicationSecurityGroupName = testutil.GenerateAlphaNumericID(testsuite.T(), "applicatio", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.applicationSecurityGroupName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "applicatio", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/assets.json b/sdk/resourcemanager/network/armnetwork/assets.json index 6abc0b5a641e..71c3db5cdf69 100644 --- a/sdk/resourcemanager/network/armnetwork/assets.json +++ b/sdk/resourcemanager/network/armnetwork/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/network/armnetwork", - "Tag": "go/resourcemanager/network/armnetwork_ba686d4d88" + "Tag": "go/resourcemanager/network/armnetwork_99045dec55" } diff --git a/sdk/resourcemanager/network/armnetwork/availabledelegations_live_test.go b/sdk/resourcemanager/network/armnetwork/availabledelegations_live_test.go index 3bec72cc03f2..cfc4a91fb9aa 100644 --- a/sdk/resourcemanager/network/armnetwork/availabledelegations_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/availabledelegations_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *AvailableDelegationsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/availableservicealiases_live_test.go b/sdk/resourcemanager/network/armnetwork/availableservicealiases_live_test.go index 81ff19ef6296..94e1c04c6709 100644 --- a/sdk/resourcemanager/network/armnetwork/availableservicealiases_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/availableservicealiases_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *AvailableServiceAliasesTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntag_live_test.go b/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntag_live_test.go index ddb7dfa07de8..d5dccbf2ee5b 100644 --- a/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntag_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntag_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *AzureFirewallFqdnTagTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/azurewebcategory_live_test.go b/sdk/resourcemanager/network/armnetwork/azurewebcategory_live_test.go index c6a76d4d18c6..5a81c7afb7eb 100644 --- a/sdk/resourcemanager/network/armnetwork/azurewebcategory_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/azurewebcategory_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *AzureWebCategoryTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/bastionhost_live_test.go b/sdk/resourcemanager/network/armnetwork/bastionhost_live_test.go index b817ea079ee4..6e9ac1585587 100644 --- a/sdk/resourcemanager/network/armnetwork/bastionhost_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/bastionhost_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -38,10 +39,10 @@ func (testsuite *BastionHostTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.bastionHostName = testutil.GenerateAlphaNumericID(testsuite.T(), "bastionhos", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.bastionHostName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "bastionhos", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/checkdnsavailability_live_test.go b/sdk/resourcemanager/network/armnetwork/checkdnsavailability_live_test.go index d04e1fe3a18f..bf503dfde35e 100644 --- a/sdk/resourcemanager/network/armnetwork/checkdnsavailability_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/checkdnsavailability_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *CheckDnsAvailabilityTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/customipprefix_live_test.go b/sdk/resourcemanager/network/armnetwork/customipprefix_live_test.go index 66b67b8d5400..ad908037a1a3 100644 --- a/sdk/resourcemanager/network/armnetwork/customipprefix_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/customipprefix_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *CustomIpPrefixTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.customIpPrefixName = testutil.GenerateAlphaNumericID(testsuite.T(), "customippr", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.customIpPrefixName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "customippr", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/ddosprotectionplan_live_test.go b/sdk/resourcemanager/network/armnetwork/ddosprotectionplan_live_test.go index d01f458ee975..020e4f47c550 100644 --- a/sdk/resourcemanager/network/armnetwork/ddosprotectionplan_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/ddosprotectionplan_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *DdosProtectionPlanTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.ddosProtectionPlanName = testutil.GenerateAlphaNumericID(testsuite.T(), "ddosprotec", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.ddosProtectionPlanName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "ddosprotec", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/endpointservice_live_test.go b/sdk/resourcemanager/network/armnetwork/endpointservice_live_test.go index be43bd521f7d..0ada9c39a461 100644 --- a/sdk/resourcemanager/network/armnetwork/endpointservice_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/endpointservice_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *EndpointServiceTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecircuit_live_test.go b/sdk/resourcemanager/network/armnetwork/expressroutecircuit_live_test.go index 4ca676e610dd..3cb592db4d93 100644 --- a/sdk/resourcemanager/network/armnetwork/expressroutecircuit_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/expressroutecircuit_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -38,12 +39,12 @@ func (testsuite *ExpressRouteCircuitTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.circuitName = testutil.GenerateAlphaNumericID(testsuite.T(), "circuitnam", 6) - testsuite.connectionName = testutil.GenerateAlphaNumericID(testsuite.T(), "connerc", 6) + testsuite.circuitName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "circuitnam", 16, false) + testsuite.connectionName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "connerc", 13, false) testsuite.peeringName = "AzurePrivatePeering" - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicy_live_test.go b/sdk/resourcemanager/network/armnetwork/firewallpolicy_live_test.go index be2ae9a351ed..cdb7e35a5348 100644 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicy_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/firewallpolicy_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -37,11 +38,11 @@ func (testsuite *FirewallPolicyTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.firewallPolicyName = testutil.GenerateAlphaNumericID(testsuite.T(), "firewallpo", 6) - testsuite.ruleCollectionGroupName = testutil.GenerateAlphaNumericID(testsuite.T(), "rulecollec", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.firewallPolicyName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "firewallpo", 16, false) + testsuite.ruleCollectionGroupName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "rulecollec", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/go.mod b/sdk/resourcemanager/network/armnetwork/go.mod index 64120c0d33a2..b0afe7fc60ad 100644 --- a/sdk/resourcemanager/network/armnetwork/go.mod +++ b/sdk/resourcemanager/network/armnetwork/go.mod @@ -5,12 +5,12 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/stretchr/testify v1.8.4 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/sdk/resourcemanager/network/armnetwork/ipgroups_live_test.go b/sdk/resourcemanager/network/armnetwork/ipgroups_live_test.go index 2daf0b311635..0812aa80ba0c 100644 --- a/sdk/resourcemanager/network/armnetwork/ipgroups_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/ipgroups_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *IpGroupsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.ipGroupsName = testutil.GenerateAlphaNumericID(testsuite.T(), "ipgroupsna", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.ipGroupsName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "ipgroupsna", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancer_live_test.go b/sdk/resourcemanager/network/armnetwork/loadbalancer_live_test.go index 5e0d6b66154d..773f1860fe7e 100644 --- a/sdk/resourcemanager/network/armnetwork/loadbalancer_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/loadbalancer_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -40,12 +41,12 @@ func (testsuite *LoadBalancerTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.backendAddressPoolName = testutil.GenerateAlphaNumericID(testsuite.T(), "backendadd", 6) - testsuite.inboundNatRuleName = testutil.GenerateAlphaNumericID(testsuite.T(), "inboundnat", 6) - testsuite.loadBalancerName = testutil.GenerateAlphaNumericID(testsuite.T(), "loadbalanc", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.backendAddressPoolName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "backendadd", 16, false) + testsuite.inboundNatRuleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "inboundnat", 16, false) + testsuite.loadBalancerName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "loadbalanc", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/natgateway_live_test.go b/sdk/resourcemanager/network/armnetwork/natgateway_live_test.go index 3f6a97e58134..0a82671e7607 100644 --- a/sdk/resourcemanager/network/armnetwork/natgateway_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/natgateway_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *NatGatewayTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.natGatewayName = testutil.GenerateAlphaNumericID(testsuite.T(), "natgateway", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.natGatewayName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "natgateway", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/networkinterface_live_test.go b/sdk/resourcemanager/network/armnetwork/networkinterface_live_test.go index b26657306dfb..e40e50edc5cb 100644 --- a/sdk/resourcemanager/network/armnetwork/networkinterface_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/networkinterface_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -38,11 +39,11 @@ func (testsuite *NetworkInterfaceTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.networkInterfaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkint", 6) - testsuite.virtualNetworkName = testutil.GenerateAlphaNumericID(testsuite.T(), "vnetinterfacena", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.networkInterfaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkint", 16, false) + testsuite.virtualNetworkName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "vnetinterfacena", 21, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/networkmanager_live_test.go b/sdk/resourcemanager/network/armnetwork/networkmanager_live_test.go index 0cb73d788dee..9a4284231b7a 100644 --- a/sdk/resourcemanager/network/armnetwork/networkmanager_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/networkmanager_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *NetworkManagerTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.networkManagerName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkman", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.networkManagerName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkman", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/networkmanagerconnection_live_test.go b/sdk/resourcemanager/network/armnetwork/networkmanagerconnection_live_test.go index 3b6738012f08..ec4d3551f05a 100644 --- a/sdk/resourcemanager/network/armnetwork/networkmanagerconnection_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/networkmanagerconnection_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -38,11 +39,11 @@ func (testsuite *NetworkManagerConnectionTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.networkManagerConnectionName = testutil.GenerateAlphaNumericID(testsuite.T(), "netmanagerconnsub", 6) - testsuite.networkManagerName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkmanagerconn", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.networkManagerConnectionName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "netmanagerconnsub", 23, false) + testsuite.networkManagerName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkmanagerconn", 24, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/networkmanagerconnectivityconfiguration_live_test.go b/sdk/resourcemanager/network/armnetwork/networkmanagerconnectivityconfiguration_live_test.go index fe4809e904cd..faa4fdc6b542 100644 --- a/sdk/resourcemanager/network/armnetwork/networkmanagerconnectivityconfiguration_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/networkmanagerconnectivityconfiguration_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -39,12 +40,12 @@ func (testsuite *NetworkManagerConnectivityConfigurationTestSuite) SetupSuite() testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.configurationName = testutil.GenerateAlphaNumericID(testsuite.T(), "connectivityconf", 6) - testsuite.networkGroupName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkgroconeconfig", 6) - testsuite.networkManagerName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkmancc", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.configurationName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "connectivityconf", 22, false) + testsuite.networkGroupName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkgroconeconfig", 26, false) + testsuite.networkManagerName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkmancc", 18, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/networkmanagergroup_live_test.go b/sdk/resourcemanager/network/armnetwork/networkmanagergroup_live_test.go index 98c2a7d3e83b..c61d6f3398fe 100644 --- a/sdk/resourcemanager/network/armnetwork/networkmanagergroup_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/networkmanagergroup_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -28,6 +29,7 @@ type NetworkManagerGroupTestSuite struct { networkGroupName string networkManagerName string staticMemberName string + virtualNetworkName string location string resourceGroupName string subscriptionId string @@ -38,12 +40,13 @@ func (testsuite *NetworkManagerGroupTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.networkGroupName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkgro", 6) - testsuite.networkManagerName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkmanagergp", 6) - testsuite.staticMemberName = testutil.GenerateAlphaNumericID(testsuite.T(), "staticmemberna", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.networkGroupName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkgro", 16, false) + testsuite.networkManagerName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkmanagergp", 22, false) + testsuite.staticMemberName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "staticmemberna", 20, false) + testsuite.virtualNetworkName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkgrovet", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -117,14 +120,13 @@ func (testsuite *NetworkManagerGroupTestSuite) TestNetworkGroups() { // Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName} func (testsuite *NetworkManagerGroupTestSuite) TestStaticMembers() { - virtualNetworkName := testutil.GenerateAlphaNumericID(testsuite.T(), "networkgrovet", 6) var virutalNetworkId string var err error // From step VirtualNetworks_CreateOrUpdate fmt.Println("Call operation: VirtualNetworks_CreateOrUpdate") virtualNetworksClient, err := armnetwork.NewVirtualNetworksClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - virtualNetworksClientCreateOrUpdateResponsePoller, err := virtualNetworksClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, virtualNetworkName, armnetwork.VirtualNetwork{ + virtualNetworksClientCreateOrUpdateResponsePoller, err := virtualNetworksClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, armnetwork.VirtualNetwork{ Location: to.Ptr(testsuite.location), Properties: &armnetwork.VirtualNetworkPropertiesFormat{ AddressSpace: &armnetwork.AddressSpace{ diff --git a/sdk/resourcemanager/network/armnetwork/networkmanagersecurityadminconfiguration_live_test.go b/sdk/resourcemanager/network/armnetwork/networkmanagersecurityadminconfiguration_live_test.go index 686fae2b10af..bb0282ad842b 100644 --- a/sdk/resourcemanager/network/armnetwork/networkmanagersecurityadminconfiguration_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/networkmanagersecurityadminconfiguration_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -41,14 +42,14 @@ func (testsuite *NetworkManagerSecurityAdminConfigurationTestSuite) SetupSuite() testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.configurationName = testutil.GenerateAlphaNumericID(testsuite.T(), "configurationsecurity", 6) - testsuite.networkGroupName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkgrosecurity", 6) - testsuite.networkManagerName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkmanagersecurity", 6) - testsuite.ruleCollectionName = testutil.GenerateAlphaNumericID(testsuite.T(), "rulecollec", 6) - testsuite.ruleName = testutil.GenerateAlphaNumericID(testsuite.T(), "rulename", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.configurationName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "configurationsecurity", 27, false) + testsuite.networkGroupName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkgrosecurity", 24, false) + testsuite.networkManagerName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkmanagersecurity", 28, false) + testsuite.ruleCollectionName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "rulecollec", 16, false) + testsuite.ruleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "rulename", 14, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/networkprofile_live_test.go b/sdk/resourcemanager/network/armnetwork/networkprofile_live_test.go index 84de3208fad3..fb9a3baff41b 100644 --- a/sdk/resourcemanager/network/armnetwork/networkprofile_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/networkprofile_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -38,11 +39,11 @@ func (testsuite *NetworkProfileTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.networkProfileName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkpro", 6) - testsuite.virtualNetworkName = testutil.GenerateAlphaNumericID(testsuite.T(), "vnetprofilena", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.networkProfileName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkpro", 16, false) + testsuite.virtualNetworkName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "vnetprofilena", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/networksecuritygroup_live_test.go b/sdk/resourcemanager/network/armnetwork/networksecuritygroup_live_test.go index 29050e63ade8..e973ab996f59 100644 --- a/sdk/resourcemanager/network/armnetwork/networksecuritygroup_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/networksecuritygroup_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -37,11 +38,11 @@ func (testsuite *NetworkSecurityGroupTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.networkSecurityGroupName = testutil.GenerateAlphaNumericID(testsuite.T(), "networksec", 6) - testsuite.securityRuleName = testutil.GenerateAlphaNumericID(testsuite.T(), "securityru", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.networkSecurityGroupName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networksec", 16, false) + testsuite.securityRuleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "securityru", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/networkwatcher_live_test.go b/sdk/resourcemanager/network/armnetwork/networkwatcher_live_test.go index 7f8548986f5e..5c9d0b498adf 100644 --- a/sdk/resourcemanager/network/armnetwork/networkwatcher_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/networkwatcher_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *NetworkWatcherTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.networkWatcherName = testutil.GenerateAlphaNumericID(testsuite.T(), "networkwat", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.networkWatcherName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "networkwat", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/operation_live_test.go b/sdk/resourcemanager/network/armnetwork/operation_live_test.go index 7ef2dbcc6a10..7dabbe00fbeb 100644 --- a/sdk/resourcemanager/network/armnetwork/operation_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/operation_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *OperationTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/publicipaddress_live_test.go b/sdk/resourcemanager/network/armnetwork/publicipaddress_live_test.go index 5527a4c8980f..2bddb13a0d24 100644 --- a/sdk/resourcemanager/network/armnetwork/publicipaddress_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/publicipaddress_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *PublicIpAddressTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.publicIpAddressName = testutil.GenerateAlphaNumericID(testsuite.T(), "publicipad", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.publicIpAddressName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "publicipad", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/publicipprefix_live_test.go b/sdk/resourcemanager/network/armnetwork/publicipprefix_live_test.go index 69b32e8a741e..53c6b5eab8fd 100644 --- a/sdk/resourcemanager/network/armnetwork/publicipprefix_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/publicipprefix_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *PublicIpPrefixTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.publicIpPrefixName = testutil.GenerateAlphaNumericID(testsuite.T(), "publicippr", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.publicIpPrefixName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "publicippr", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/routetable_live_test.go b/sdk/resourcemanager/network/armnetwork/routetable_live_test.go index 225ac5fe65c6..e19ef8024270 100644 --- a/sdk/resourcemanager/network/armnetwork/routetable_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/routetable_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -26,6 +27,7 @@ type RouteTableTestSuite struct { cred azcore.TokenCredential options *arm.ClientOptions routeTableName string + routeName string location string resourceGroupName string subscriptionId string @@ -36,10 +38,11 @@ func (testsuite *RouteTableTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.routeTableName = testutil.GenerateAlphaNumericID(testsuite.T(), "routetable", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.routeTableName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "routetable", 16, false) + testsuite.routeName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "routename", 15, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -112,13 +115,12 @@ func (testsuite *RouteTableTestSuite) TestRouteTables() { // Microsoft.Network/routeTables/{routeTableName}/routes/{routeName} func (testsuite *RouteTableTestSuite) TestRoutes() { - routeName := testutil.GenerateAlphaNumericID(testsuite.T(), "routename", 6) var err error // From step Routes_CreateOrUpdate fmt.Println("Call operation: Routes_CreateOrUpdate") routesClient, err := armnetwork.NewRoutesClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - routesClientCreateOrUpdateResponsePoller, err := routesClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.routeTableName, routeName, armnetwork.Route{ + routesClientCreateOrUpdateResponsePoller, err := routesClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.routeTableName, testsuite.routeName, armnetwork.Route{ Properties: &armnetwork.RoutePropertiesFormat{ AddressPrefix: to.Ptr("10.0.3.0/24"), NextHopType: to.Ptr(armnetwork.RouteNextHopTypeVirtualNetworkGateway), @@ -139,12 +141,12 @@ func (testsuite *RouteTableTestSuite) TestRoutes() { // From step Routes_Get fmt.Println("Call operation: Routes_Get") - _, err = routesClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.routeTableName, routeName, nil) + _, err = routesClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.routeTableName, testsuite.routeName, nil) testsuite.Require().NoError(err) // From step Routes_Delete fmt.Println("Call operation: Routes_Delete") - routesClientDeleteResponsePoller, err := routesClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.routeTableName, routeName, nil) + routesClientDeleteResponsePoller, err := routesClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.routeTableName, testsuite.routeName, nil) testsuite.Require().NoError(err) _, err = testutil.PollForTest(testsuite.ctx, routesClientDeleteResponsePoller) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/network/armnetwork/servicecommunity_live_test.go b/sdk/resourcemanager/network/armnetwork/servicecommunity_live_test.go index 91f945035a9a..4a5ecfe2498e 100644 --- a/sdk/resourcemanager/network/armnetwork/servicecommunity_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/servicecommunity_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *ServiceCommunityTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicy_live_test.go b/sdk/resourcemanager/network/armnetwork/serviceendpointpolicy_live_test.go index 28e6f7911b9f..e5c1b267a593 100644 --- a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicy_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/serviceendpointpolicy_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -22,13 +23,14 @@ import ( type ServiceEndpointPolicyTestSuite struct { suite.Suite - ctx context.Context - cred azcore.TokenCredential - options *arm.ClientOptions - serviceEndpointPolicyName string - location string - resourceGroupName string - subscriptionId string + ctx context.Context + cred azcore.TokenCredential + options *arm.ClientOptions + serviceEndpointPolicyName string + serviceEndpointPolicyDefinitionName string + location string + resourceGroupName string + subscriptionId string } func (testsuite *ServiceEndpointPolicyTestSuite) SetupSuite() { @@ -36,10 +38,11 @@ func (testsuite *ServiceEndpointPolicyTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.serviceEndpointPolicyName = testutil.GenerateAlphaNumericID(testsuite.T(), "serviceend", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.serviceEndpointPolicyName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceend", 16, false) + testsuite.serviceEndpointPolicyDefinitionName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "serviceenddef", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -112,13 +115,12 @@ func (testsuite *ServiceEndpointPolicyTestSuite) TestServiceEndpointPolicies() { // Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName} func (testsuite *ServiceEndpointPolicyTestSuite) TestServiceEndpointPolicyDefinitions() { - serviceEndpointPolicyDefinitionName := testutil.GenerateAlphaNumericID(testsuite.T(), "serviceend", 6) var err error // From step ServiceEndpointPolicyDefinitions_CreateOrUpdate fmt.Println("Call operation: ServiceEndpointPolicyDefinitions_CreateOrUpdate") serviceEndpointPolicyDefinitionsClient, err := armnetwork.NewServiceEndpointPolicyDefinitionsClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - serviceEndpointPolicyDefinitionsClientCreateOrUpdateResponsePoller, err := serviceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, armnetwork.ServiceEndpointPolicyDefinition{ + serviceEndpointPolicyDefinitionsClientCreateOrUpdateResponsePoller, err := serviceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.serviceEndpointPolicyName, testsuite.serviceEndpointPolicyDefinitionName, armnetwork.ServiceEndpointPolicyDefinition{ Properties: &armnetwork.ServiceEndpointPolicyDefinitionPropertiesFormat{ Description: to.Ptr("Storage Service EndpointPolicy Definition"), Service: to.Ptr("Microsoft.Storage"), @@ -141,12 +143,12 @@ func (testsuite *ServiceEndpointPolicyTestSuite) TestServiceEndpointPolicyDefini // From step ServiceEndpointPolicyDefinitions_Get fmt.Println("Call operation: ServiceEndpointPolicyDefinitions_Get") - _, err = serviceEndpointPolicyDefinitionsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, nil) + _, err = serviceEndpointPolicyDefinitionsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.serviceEndpointPolicyName, testsuite.serviceEndpointPolicyDefinitionName, nil) testsuite.Require().NoError(err) // From step ServiceEndpointPolicyDefinitions_Delete fmt.Println("Call operation: ServiceEndpointPolicyDefinitions_Delete") - serviceEndpointPolicyDefinitionsClientDeleteResponsePoller, err := serviceEndpointPolicyDefinitionsClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, nil) + serviceEndpointPolicyDefinitionsClientDeleteResponsePoller, err := serviceEndpointPolicyDefinitionsClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.serviceEndpointPolicyName, testsuite.serviceEndpointPolicyDefinitionName, nil) testsuite.Require().NoError(err) _, err = testutil.PollForTest(testsuite.ctx, serviceEndpointPolicyDefinitionsClientDeleteResponsePoller) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/network/armnetwork/servicetags_live_test.go b/sdk/resourcemanager/network/armnetwork/servicetags_live_test.go index d6bf946a99bc..7ffb2accbd7a 100644 --- a/sdk/resourcemanager/network/armnetwork/servicetags_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/servicetags_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *ServiceTagsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/usage_live_test.go b/sdk/resourcemanager/network/armnetwork/usage_live_test.go index c0ca32c4175c..39f013cc6e08 100644 --- a/sdk/resourcemanager/network/armnetwork/usage_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/usage_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *UsageTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetwork_live_test.go b/sdk/resourcemanager/network/armnetwork/virtualnetwork_live_test.go index e249df5f56bc..ba5ee4e8be51 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualnetwork_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/virtualnetwork_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -22,13 +23,15 @@ import ( type VirtualNetworkTestSuite struct { suite.Suite - ctx context.Context - cred azcore.TokenCredential - options *arm.ClientOptions - virtualNetworkName string - location string - resourceGroupName string - subscriptionId string + ctx context.Context + cred azcore.TokenCredential + options *arm.ClientOptions + virtualNetworkName string + virtualNetworkPeeringName string + subnetName string + location string + resourceGroupName string + subscriptionId string } func (testsuite *VirtualNetworkTestSuite) SetupSuite() { @@ -36,10 +39,12 @@ func (testsuite *VirtualNetworkTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.virtualNetworkName = testutil.GenerateAlphaNumericID(testsuite.T(), "virtualnet", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.virtualNetworkName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "virtualnet", 16, false) + testsuite.virtualNetworkPeeringName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "virtualnetpee", 19, false) + testsuite.subnetName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "subnetname", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -142,13 +147,12 @@ func (testsuite *VirtualNetworkTestSuite) TestVirtualNetworks() { // Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} func (testsuite *VirtualNetworkTestSuite) TestSubnets() { - subnetName := testutil.GenerateAlphaNumericID(testsuite.T(), "subnetname", 6) var err error // From step Subnets_CreateOrUpdate fmt.Println("Call operation: Subnets_CreateOrUpdate") subnetsClient, err := armnetwork.NewSubnetsClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - subnetsClientCreateOrUpdateResponsePoller, err := subnetsClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, subnetName, armnetwork.Subnet{ + subnetsClientCreateOrUpdateResponsePoller, err := subnetsClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, testsuite.subnetName, armnetwork.Subnet{ Properties: &armnetwork.SubnetPropertiesFormat{ AddressPrefix: to.Ptr("10.0.0.0/16"), }, @@ -168,12 +172,12 @@ func (testsuite *VirtualNetworkTestSuite) TestSubnets() { // From step Subnets_Get fmt.Println("Call operation: Subnets_Get") - _, err = subnetsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, subnetName, &armnetwork.SubnetsClientGetOptions{Expand: nil}) + _, err = subnetsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, testsuite.subnetName, &armnetwork.SubnetsClientGetOptions{Expand: nil}) testsuite.Require().NoError(err) // From step Subnets_Delete fmt.Println("Call operation: Subnets_Delete") - subnetsClientDeleteResponsePoller, err := subnetsClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, subnetName, nil) + subnetsClientDeleteResponsePoller, err := subnetsClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, testsuite.subnetName, nil) testsuite.Require().NoError(err) _, err = testutil.PollForTest(testsuite.ctx, subnetsClientDeleteResponsePoller) testsuite.Require().NoError(err) @@ -181,13 +185,12 @@ func (testsuite *VirtualNetworkTestSuite) TestSubnets() { // Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName} func (testsuite *VirtualNetworkTestSuite) TestVirtualNetworkPeerings() { - virtualNetworkPeeringName := testutil.GenerateAlphaNumericID(testsuite.T(), "virtualnet", 6) var err error // From step VirtualNetworks_CreateOrUpdate fmt.Println("Call operation: VirtualNetworks_CreateOrUpdate") virtualNetworksClient, err := armnetwork.NewVirtualNetworksClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - virtualNetworksClientCreateOrUpdateResponsePoller, err := virtualNetworksClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, virtualNetworkPeeringName, armnetwork.VirtualNetwork{ + virtualNetworksClientCreateOrUpdateResponsePoller, err := virtualNetworksClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkPeeringName, armnetwork.VirtualNetwork{ Location: to.Ptr(testsuite.location), Properties: &armnetwork.VirtualNetworkPropertiesFormat{ AddressSpace: &armnetwork.AddressSpace{ @@ -206,7 +209,7 @@ func (testsuite *VirtualNetworkTestSuite) TestVirtualNetworkPeerings() { fmt.Println("Call operation: VirtualNetworkPeerings_CreateOrUpdate") virtualNetworkPeeringsClient, err := armnetwork.NewVirtualNetworkPeeringsClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - virtualNetworkPeeringsClientCreateOrUpdateResponsePoller, err := virtualNetworkPeeringsClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, virtualNetworkPeeringName, armnetwork.VirtualNetworkPeering{ + virtualNetworkPeeringsClientCreateOrUpdateResponsePoller, err := virtualNetworkPeeringsClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, testsuite.virtualNetworkPeeringName, armnetwork.VirtualNetworkPeering{ Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{ AllowForwardedTraffic: to.Ptr(true), AllowGatewayTransit: to.Ptr(false), @@ -232,12 +235,12 @@ func (testsuite *VirtualNetworkTestSuite) TestVirtualNetworkPeerings() { // From step VirtualNetworkPeerings_Get fmt.Println("Call operation: VirtualNetworkPeerings_Get") - _, err = virtualNetworkPeeringsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, virtualNetworkPeeringName, nil) + _, err = virtualNetworkPeeringsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, testsuite.virtualNetworkPeeringName, nil) testsuite.Require().NoError(err) // From step VirtualNetworkPeerings_Delete fmt.Println("Call operation: VirtualNetworkPeerings_Delete") - virtualNetworkPeeringsClientDeleteResponsePoller, err := virtualNetworkPeeringsClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, virtualNetworkPeeringName, nil) + virtualNetworkPeeringsClientDeleteResponsePoller, err := virtualNetworkPeeringsClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualNetworkName, testsuite.virtualNetworkPeeringName, nil) testsuite.Require().NoError(err) _, err = testutil.PollForTest(testsuite.ctx, virtualNetworkPeeringsClientDeleteResponsePoller) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworkgateway_live_test.go b/sdk/resourcemanager/network/armnetwork/virtualnetworkgateway_live_test.go index 347fd123c5cc..fa585d81c2a0 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworkgateway_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/virtualnetworkgateway_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -30,6 +31,7 @@ type VirtualNetworkGatewayTestSuite struct { subnetId string virtualNetworkGatewayName string virtualNetworkName string + localNetworkGatewayName string location string resourceGroupName string subscriptionId string @@ -40,12 +42,13 @@ func (testsuite *VirtualNetworkGatewayTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.publicIpAddressName = testutil.GenerateAlphaNumericID(testsuite.T(), "publicipadgateway", 6) - testsuite.virtualNetworkGatewayName = testutil.GenerateAlphaNumericID(testsuite.T(), "virtualnetgateway", 6) - testsuite.virtualNetworkName = testutil.GenerateAlphaNumericID(testsuite.T(), "virtualnetgateway", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.publicIpAddressName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "publicipadgateway", 23, false) + testsuite.virtualNetworkGatewayName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "virtualnetgateway", 23, false) + testsuite.virtualNetworkName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "virtualnetgateway", 23, false) + testsuite.localNetworkGatewayName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "localnetwo", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -182,13 +185,12 @@ func (testsuite *VirtualNetworkGatewayTestSuite) TestVirtualNetworkGateways() { // Microsoft.Network/localNetworkGateways/{localNetworkGatewayName} func (testsuite *VirtualNetworkGatewayTestSuite) TestLocalNetworkGateways() { - localNetworkGatewayName := testutil.GenerateAlphaNumericID(testsuite.T(), "localnetwo", 6) var err error // From step LocalNetworkGateways_CreateOrUpdate fmt.Println("Call operation: LocalNetworkGateways_CreateOrUpdate") localNetworkGatewaysClient, err := armnetwork.NewLocalNetworkGatewaysClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - localNetworkGatewaysClientCreateOrUpdateResponsePoller, err := localNetworkGatewaysClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, localNetworkGatewayName, armnetwork.LocalNetworkGateway{ + localNetworkGatewaysClientCreateOrUpdateResponsePoller, err := localNetworkGatewaysClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.localNetworkGatewayName, armnetwork.LocalNetworkGateway{ Location: to.Ptr(testsuite.location), Properties: &armnetwork.LocalNetworkGatewayPropertiesFormat{ GatewayIPAddress: to.Ptr("11.12.13.14"), @@ -213,12 +215,12 @@ func (testsuite *VirtualNetworkGatewayTestSuite) TestLocalNetworkGateways() { // From step LocalNetworkGateways_Get fmt.Println("Call operation: LocalNetworkGateways_Get") - _, err = localNetworkGatewaysClient.Get(testsuite.ctx, testsuite.resourceGroupName, localNetworkGatewayName, nil) + _, err = localNetworkGatewaysClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.localNetworkGatewayName, nil) testsuite.Require().NoError(err) // From step LocalNetworkGateways_UpdateTags fmt.Println("Call operation: LocalNetworkGateways_UpdateTags") - _, err = localNetworkGatewaysClient.UpdateTags(testsuite.ctx, testsuite.resourceGroupName, localNetworkGatewayName, armnetwork.TagsObject{ + _, err = localNetworkGatewaysClient.UpdateTags(testsuite.ctx, testsuite.resourceGroupName, testsuite.localNetworkGatewayName, armnetwork.TagsObject{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), @@ -228,7 +230,7 @@ func (testsuite *VirtualNetworkGatewayTestSuite) TestLocalNetworkGateways() { // From step LocalNetworkGateways_Delete fmt.Println("Call operation: LocalNetworkGateways_Delete") - localNetworkGatewaysClientDeleteResponsePoller, err := localNetworkGatewaysClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, localNetworkGatewayName, nil) + localNetworkGatewaysClientDeleteResponsePoller, err := localNetworkGatewaysClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.localNetworkGatewayName, nil) testsuite.Require().NoError(err) _, err = testutil.PollForTest(testsuite.ctx, localNetworkGatewaysClientDeleteResponsePoller) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/network/armnetwork/virtualwan_live_test.go b/sdk/resourcemanager/network/armnetwork/virtualwan_live_test.go index 6e0dc87eba3c..005116dfd0fc 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualwan_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/virtualwan_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -32,6 +33,7 @@ type VirtualWanTestSuite struct { virtualWanId string vpnServerConfigurationName string vpnSiteName string + routeMapName string location string resourceGroupName string subscriptionId string @@ -42,14 +44,15 @@ func (testsuite *VirtualWanTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.gatewayName = testutil.GenerateAlphaNumericID(testsuite.T(), "gatewaynam", 6) - testsuite.virtualHubName = testutil.GenerateAlphaNumericID(testsuite.T(), "virtualhub", 6) - testsuite.virtualWANName = testutil.GenerateAlphaNumericID(testsuite.T(), "virtualwan", 6) - testsuite.vpnServerConfigurationName = testutil.GenerateAlphaNumericID(testsuite.T(), "vpnserverc", 6) - testsuite.vpnSiteName = testutil.GenerateAlphaNumericID(testsuite.T(), "vpnsitenam", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.gatewayName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "gatewaynam", 16, false) + testsuite.virtualHubName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "virtualhub", 16, false) + testsuite.virtualWANName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "virtualwan", 16, false) + testsuite.vpnServerConfigurationName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "vpnserverc", 16, false) + testsuite.vpnSiteName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "vpnsitenam", 16, false) + testsuite.routeMapName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "routemapna", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -297,13 +300,12 @@ func (testsuite *VirtualWanTestSuite) TestVirtualHubs() { // Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName} func (testsuite *VirtualWanTestSuite) TestRouteMaps() { - routeMapName := testutil.GenerateAlphaNumericID(testsuite.T(), "routemapna", 6) var err error // From step RouteMaps_CreateOrUpdate fmt.Println("Call operation: RouteMaps_CreateOrUpdate") routeMapsClient, err := armnetwork.NewRouteMapsClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - routeMapsClientCreateOrUpdateResponsePoller, err := routeMapsClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualHubName, routeMapName, armnetwork.RouteMap{ + routeMapsClientCreateOrUpdateResponsePoller, err := routeMapsClient.BeginCreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualHubName, testsuite.routeMapName, armnetwork.RouteMap{ Properties: &armnetwork.RouteMapProperties{ AssociatedInboundConnections: []*string{ to.Ptr("/subscriptions/" + testsuite.subscriptionId + "/resourceGroups/" + testsuite.resourceGroupName + "/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1")}, @@ -349,12 +351,12 @@ func (testsuite *VirtualWanTestSuite) TestRouteMaps() { // From step RouteMaps_Get fmt.Println("Call operation: RouteMaps_Get") - _, err = routeMapsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualHubName, routeMapName, nil) + _, err = routeMapsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualHubName, testsuite.routeMapName, nil) testsuite.Require().NoError(err) // From step RouteMaps_Delete fmt.Println("Call operation: RouteMaps_Delete") - routeMapsClientDeleteResponsePoller, err := routeMapsClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualHubName, routeMapName, nil) + routeMapsClientDeleteResponsePoller, err := routeMapsClient.BeginDelete(testsuite.ctx, testsuite.resourceGroupName, testsuite.virtualHubName, testsuite.routeMapName, nil) testsuite.Require().NoError(err) _, err = testutil.PollForTest(testsuite.ctx, routeMapsClientDeleteResponsePoller) testsuite.Require().NoError(err) diff --git a/sdk/resourcemanager/network/armnetwork/webapplicationfirewall_live_test.go b/sdk/resourcemanager/network/armnetwork/webapplicationfirewall_live_test.go index d0ed022b496c..b4906d0a2202 100644 --- a/sdk/resourcemanager/network/armnetwork/webapplicationfirewall_live_test.go +++ b/sdk/resourcemanager/network/armnetwork/webapplicationfirewall_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *WebapplicationfirewallTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.policyName = testutil.GenerateAlphaNumericID(testsuite.T(), "wafpolicyname", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.policyName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "wafpolicyname", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/assets.json b/sdk/resourcemanager/operationalinsights/armoperationalinsights/assets.json index 0665662c0c88..74146a7c9c2c 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/assets.json +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/operationalinsights/armoperationalinsights", - "Tag": "go/resourcemanager/operationalinsights/armoperationalinsights_e8cecf46c1" + "Tag": "go/resourcemanager/operationalinsights/armoperationalinsights_13213d36f9" } diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/clusters_live_test.go b/sdk/resourcemanager/operationalinsights/armoperationalinsights/clusters_live_test.go index 15216127629d..8c2d22f9299e 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/clusters_live_test.go +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/clusters_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *ClustersTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.clusterName = testutil.GenerateAlphaNumericID(testsuite.T(), "oicluster", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.clusterName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "oicluster", 15, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/dataexports_live_test.go b/sdk/resourcemanager/operationalinsights/armoperationalinsights/dataexports_live_test.go index 4eb1c908b8ce..f2b8e1e3cd28 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/dataexports_live_test.go +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/dataexports_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -39,12 +40,12 @@ func (testsuite *DataExportsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.namespacesName = testutil.GenerateAlphaNumericID(testsuite.T(), "eventhubnamespace", 6) - testsuite.workspaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "oidataexport", 6) - testsuite.eventhubId = testutil.GetEnv("EVENTHUB_ID", "") - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.namespacesName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "eventhubnamespace", 23, false) + testsuite.workspaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "oidataexport", 18, false) + testsuite.eventhubId = recording.GetEnvVariable("EVENTHUB_ID", "") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/datasources_live_test.go b/sdk/resourcemanager/operationalinsights/armoperationalinsights/datasources_live_test.go index 5022ebd844f6..17f3e4947e4b 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/datasources_live_test.go +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/datasources_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -40,13 +41,13 @@ func (testsuite *DataSourcesTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.dataSourceName = testutil.GenerateAlphaNumericID(testsuite.T(), "iodatasource", 6) + testsuite.dataSourceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "iodatasource", 18, false) testsuite.storageAccountName = "oistorageaccountx" - testsuite.workspaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "oiautorest", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.storageAccountId = testutil.GetEnv("STORAGE_ACCOUNT_ID", "") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.workspaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "oiautorest", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.storageAccountId = recording.GetEnvVariable("STORAGE_ACCOUNT_ID", "") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/go.mod b/sdk/resourcemanager/operationalinsights/armoperationalinsights/go.mod index 7226e4eec699..4ce2878c9f9a 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/go.mod +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/go.mod @@ -5,13 +5,13 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.7.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnaeon/go-vcr v1.1.0 // indirect diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/go.sum b/sdk/resourcemanager/operationalinsights/armoperationalinsights/go.sum index 6e2c77825a2c..57a48677bc2c 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/go.sum +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/go.sum @@ -2,8 +2,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/intelligencepacks_live_test.go b/sdk/resourcemanager/operationalinsights/armoperationalinsights/intelligencepacks_live_test.go index f02bf4670a18..f1005b1c2f60 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/intelligencepacks_live_test.go +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/intelligencepacks_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *IntelligencePacksTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.workspaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "oiintelliagencepack", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.workspaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "oiintelliagencepack", 25, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedservices_live_test.go b/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedservices_live_test.go index c03119619019..efa524403d6e 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedservices_live_test.go +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedservices_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/stretchr/testify/suite" @@ -38,11 +39,11 @@ func (testsuite *LinkedServicesTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.clusterName = testutil.GenerateAlphaNumericID(testsuite.T(), "linkedservicecluser", 6) - testsuite.workspaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "oilinkedservice", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.clusterName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "linkedservicecluser", 25, false) + testsuite.workspaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "oilinkedservice", 21, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedstorageaccounts_live_test.go b/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedstorageaccounts_live_test.go index 154eb2093be9..d0ab331f28ae 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedstorageaccounts_live_test.go +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/linkedstorageaccounts_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -40,11 +41,11 @@ func (testsuite *LinkedStorageAccountsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) testsuite.storageAccountName = "oilinkedstorageaccountx" - testsuite.workspaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "oilinkedstorageaccount", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.storageAccountId = testutil.GetEnv("STORAGE_ACCOUNT_ID", "") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.workspaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "oilinkedstorageaccount", 28, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.storageAccountId = recording.GetEnvVariable("STORAGE_ACCOUNT_ID", "") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/savedsearches_live_test.go b/sdk/resourcemanager/operationalinsights/armoperationalinsights/savedsearches_live_test.go index e9ad8e74c028..f07a92f76a69 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/savedsearches_live_test.go +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/savedsearches_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *SavedSearchesTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.workspaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "oisavesearch", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.workspaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "oisavesearch", 18, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/storageinsightconfigs_live_test.go b/sdk/resourcemanager/operationalinsights/armoperationalinsights/storageinsightconfigs_live_test.go index 0076b983c54c..635543afca7c 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/storageinsightconfigs_live_test.go +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/storageinsightconfigs_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -40,11 +41,11 @@ func (testsuite *StorageInsightConfigsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) testsuite.storageAccountName = "oistorageinsightconfigx" - testsuite.workspaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "oistorageinsightconfig", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.storageAccountId = testutil.GetEnv("STORAGE_ACCOUNT_ID", "") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.workspaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "oistorageinsightconfig", 28, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.storageAccountId = recording.GetEnvVariable("STORAGE_ACCOUNT_ID", "") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspaces_live_test.go b/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspaces_live_test.go index 7cf85faac142..75ef8b4adbb5 100644 --- a/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspaces_live_test.go +++ b/sdk/resourcemanager/operationalinsights/armoperationalinsights/workspaces_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/stretchr/testify/suite" @@ -36,10 +37,10 @@ func (testsuite *WorkspacesTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.workspaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "oiautorestws", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.workspaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "oiautorestws", 18, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/redis/armredis/assets.json b/sdk/resourcemanager/redis/armredis/assets.json index 3956a1f71549..c7f26e1c6a40 100644 --- a/sdk/resourcemanager/redis/armredis/assets.json +++ b/sdk/resourcemanager/redis/armredis/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/redis/armredis", - "Tag": "go/resourcemanager/redis/armredis_694ca666e7" + "Tag": "go/resourcemanager/redis/armredis_bd20141886" } diff --git a/sdk/resourcemanager/redis/armredis/go.mod b/sdk/resourcemanager/redis/armredis/go.mod index 24513afec877..b0ec7da5f416 100644 --- a/sdk/resourcemanager/redis/armredis/go.mod +++ b/sdk/resourcemanager/redis/armredis/go.mod @@ -5,13 +5,13 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.7.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnaeon/go-vcr v1.1.0 // indirect diff --git a/sdk/resourcemanager/redis/armredis/go.sum b/sdk/resourcemanager/redis/armredis/go.sum index 6e2c77825a2c..57a48677bc2c 100644 --- a/sdk/resourcemanager/redis/armredis/go.sum +++ b/sdk/resourcemanager/redis/armredis/go.sum @@ -2,8 +2,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= diff --git a/sdk/resourcemanager/redis/armredis/redis_live_test.go b/sdk/resourcemanager/redis/armredis/redis_live_test.go index 949a92fdd184..906b217bc37d 100644 --- a/sdk/resourcemanager/redis/armredis/redis_live_test.go +++ b/sdk/resourcemanager/redis/armredis/redis_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" @@ -40,12 +41,12 @@ func (testsuite *RedisTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.name = testutil.GenerateAlphaNumericID(testsuite.T(), "redisna", 6) - testsuite.privateEndpointName = testutil.GenerateAlphaNumericID(testsuite.T(), "redisprivateendpoint", 6) - testsuite.location = testutil.GetEnv("LOCATION", "eastus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subnetId = testutil.GetEnv("SUBNET_ID", "") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.name, _ = recording.GenerateAlphaNumericID(testsuite.T(), "redisna", 13, false) + testsuite.privateEndpointName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "redisprivateendpoint", 26, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "eastus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subnetId = recording.GetEnvVariable("SUBNET_ID", "") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/servicebus/armservicebus/assets.json b/sdk/resourcemanager/servicebus/armservicebus/assets.json index 9ab7472a5009..b69ebd236eec 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/assets.json +++ b/sdk/resourcemanager/servicebus/armservicebus/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/servicebus/armservicebus", - "Tag": "go/resourcemanager/servicebus/armservicebus_12348758c5" + "Tag": "go/resourcemanager/servicebus/armservicebus_232ad50803" } diff --git a/sdk/resourcemanager/servicebus/armservicebus/disasterrecoveryconfig_live_test.go b/sdk/resourcemanager/servicebus/armservicebus/disasterrecoveryconfig_live_test.go index abb9a3a9f55e..121c460771bd 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/disasterrecoveryconfig_live_test.go +++ b/sdk/resourcemanager/servicebus/armservicebus/disasterrecoveryconfig_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" "github.com/stretchr/testify/suite" @@ -29,6 +30,7 @@ type DisasterRecoveryConfigTestSuite struct { namespaceName string primaryNamespaceId string primaryNamespaceName string + alias string location string resourceGroupName string subscriptionId string @@ -39,12 +41,13 @@ func (testsuite *DisasterRecoveryConfigTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.authorizationRuleName = testutil.GenerateAlphaNumericID(testsuite.T(), "namespaceauthoriz", 6) - testsuite.namespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "namespac", 6) - testsuite.primaryNamespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "promarynamespac", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.authorizationRuleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespaceauthoriz", 23, false) + testsuite.namespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespac", 14, false) + testsuite.primaryNamespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "promarynamespac", 21, false) + testsuite.alias, _ = recording.GenerateAlphaNumericID(testsuite.T(), "drcalias", 14, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -107,7 +110,6 @@ func (testsuite *DisasterRecoveryConfigTestSuite) Prepare() { // Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias} func (testsuite *DisasterRecoveryConfigTestSuite) TestDisasterRecoveryConfigs() { - alias := testutil.GenerateAlphaNumericID(testsuite.T(), "drcalias", 6) var err error // From step DisasterRecoveryConfigs_CheckNameAvailability fmt.Println("Call operation: DisasterRecoveryConfigs_CheckNameAvailability") @@ -120,7 +122,7 @@ func (testsuite *DisasterRecoveryConfigTestSuite) TestDisasterRecoveryConfigs() // From step DisasterRecoveryConfigs_CreateOrUpdate fmt.Println("Call operation: DisasterRecoveryConfigs_CreateOrUpdate") - _, err = disasterRecoveryConfigsClient.CreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, alias, armservicebus.ArmDisasterRecovery{ + _, err = disasterRecoveryConfigsClient.CreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.alias, armservicebus.ArmDisasterRecovery{ Properties: &armservicebus.ArmDisasterRecoveryProperties{ PartnerNamespace: to.Ptr(testsuite.primaryNamespaceId), }, @@ -138,12 +140,12 @@ func (testsuite *DisasterRecoveryConfigTestSuite) TestDisasterRecoveryConfigs() // From step DisasterRecoveryConfigs_Get fmt.Println("Call operation: DisasterRecoveryConfigs_Get") - _, err = disasterRecoveryConfigsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, alias, nil) + _, err = disasterRecoveryConfigsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.alias, nil) testsuite.Require().NoError(err) // From step DisasterRecoveryConfigs_ListAuthorizationRules fmt.Println("Call operation: DisasterRecoveryConfigs_ListAuthorizationRules") - disasterRecoveryConfigsClientNewListAuthorizationRulesPager := disasterRecoveryConfigsClient.NewListAuthorizationRulesPager(testsuite.resourceGroupName, testsuite.namespaceName, alias, nil) + disasterRecoveryConfigsClientNewListAuthorizationRulesPager := disasterRecoveryConfigsClient.NewListAuthorizationRulesPager(testsuite.resourceGroupName, testsuite.namespaceName, testsuite.alias, nil) for disasterRecoveryConfigsClientNewListAuthorizationRulesPager.More() { _, err := disasterRecoveryConfigsClientNewListAuthorizationRulesPager.NextPage(testsuite.ctx) testsuite.Require().NoError(err) @@ -152,11 +154,11 @@ func (testsuite *DisasterRecoveryConfigTestSuite) TestDisasterRecoveryConfigs() // From step DisasterRecoveryConfigs_GetAuthorizationRule fmt.Println("Call operation: DisasterRecoveryConfigs_GetAuthorizationRule") - _, err = disasterRecoveryConfigsClient.GetAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, alias, testsuite.authorizationRuleName, nil) + _, err = disasterRecoveryConfigsClient.GetAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.alias, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) // From step DisasterRecoveryConfigs_ListKeys fmt.Println("Call operation: DisasterRecoveryConfigs_ListKeys") - _, err = disasterRecoveryConfigsClient.ListKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, alias, testsuite.authorizationRuleName, nil) + _, err = disasterRecoveryConfigsClient.ListKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.alias, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) } diff --git a/sdk/resourcemanager/servicebus/armservicebus/go.mod b/sdk/resourcemanager/servicebus/armservicebus/go.mod index 9c25fc171a4a..b88e555bb89d 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/go.mod +++ b/sdk/resourcemanager/servicebus/armservicebus/go.mod @@ -5,13 +5,13 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.7.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnaeon/go-vcr v1.1.0 // indirect diff --git a/sdk/resourcemanager/servicebus/armservicebus/go.sum b/sdk/resourcemanager/servicebus/armservicebus/go.sum index 05c50ce40fb1..008fb0b4bfdd 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/go.sum +++ b/sdk/resourcemanager/servicebus/armservicebus/go.sum @@ -2,8 +2,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 h1:T8quHYlUGyb/oqtSTwqlCr1ilJHrDv+ZtpSfo+hm1BU= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1/go.mod h1:gLa1CL2RNE4s7M3yopJ/p0iq5DdY6Yv5ZUt9MTRZOQM= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= diff --git a/sdk/resourcemanager/servicebus/armservicebus/migrationconfigs_live_test.go b/sdk/resourcemanager/servicebus/armservicebus/migrationconfigs_live_test.go index e85b66db79c1..c289f8c201ea 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/migrationconfigs_live_test.go +++ b/sdk/resourcemanager/servicebus/armservicebus/migrationconfigs_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" "github.com/stretchr/testify/suite" @@ -28,6 +29,7 @@ type MigrationconfigsTestSuite struct { namespaceName string namespaceNameSecond string secondNamespaceId string + postMigrationName string location string resourceGroupName string subscriptionId string @@ -38,11 +40,12 @@ func (testsuite *MigrationconfigsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.namespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "namespac", 6) - testsuite.namespaceNameSecond = testutil.GenerateAlphaNumericID(testsuite.T(), "namespacsecond", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.namespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespac", 14, false) + testsuite.namespaceNameSecond, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespacsecond", 20, false) + testsuite.postMigrationName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "postmigrationna", 21, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -94,7 +97,6 @@ func (testsuite *MigrationconfigsTestSuite) Prepare() { // Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName} func (testsuite *MigrationconfigsTestSuite) TestMigrationConfigs() { - postMigrationName := testutil.GenerateAlphaNumericID(testsuite.T(), "postmigrationna", 6) var err error // From step MigrationConfigs_CreateAndStartMigration fmt.Println("Call operation: MigrationConfigs_CreateAndStartMigration") @@ -102,7 +104,7 @@ func (testsuite *MigrationconfigsTestSuite) TestMigrationConfigs() { testsuite.Require().NoError(err) migrationConfigsClientCreateAndStartMigrationResponsePoller, err := migrationConfigsClient.BeginCreateAndStartMigration(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, armservicebus.MigrationConfigurationNameDefault, armservicebus.MigrationConfigProperties{ Properties: &armservicebus.MigrationConfigPropertiesProperties{ - PostMigrationName: to.Ptr(postMigrationName), + PostMigrationName: to.Ptr(testsuite.postMigrationName), TargetNamespace: to.Ptr(testsuite.secondNamespaceId), }, }, nil) diff --git a/sdk/resourcemanager/servicebus/armservicebus/namespace_live_test.go b/sdk/resourcemanager/servicebus/armservicebus/namespace_live_test.go index 685070f6aa21..d9c893aadd64 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/namespace_live_test.go +++ b/sdk/resourcemanager/servicebus/armservicebus/namespace_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" @@ -23,15 +24,16 @@ import ( type NamespaceTestSuite struct { suite.Suite - ctx context.Context - cred azcore.TokenCredential - options *arm.ClientOptions - namespaceId string - namespaceName string - ruleSubnetId string - location string - resourceGroupName string - subscriptionId string + ctx context.Context + cred azcore.TokenCredential + options *arm.ClientOptions + namespaceId string + namespaceName string + ruleSubnetId string + authorizationRuleName string + location string + resourceGroupName string + subscriptionId string } func (testsuite *NamespaceTestSuite) SetupSuite() { @@ -39,10 +41,11 @@ func (testsuite *NamespaceTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.namespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "namespac", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.namespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespac", 14, false) + testsuite.authorizationRuleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespaceauthoriz", 23, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -316,13 +319,12 @@ func (testsuite *NamespaceTestSuite) TestNamespacesNetworkRuleSet() { // Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName} func (testsuite *NamespaceTestSuite) TestNamespacesAuthorization() { - authorizationRuleName := testutil.GenerateAlphaNumericID(testsuite.T(), "namespaceauthoriz", 6) var err error // From step Namespaces_CreateOrUpdateAuthorizationRule fmt.Println("Call operation: Namespaces_CreateOrUpdateAuthorizationRule") namespacesClient, err := armservicebus.NewNamespacesClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - _, err = namespacesClient.CreateOrUpdateAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, authorizationRuleName, armservicebus.SBAuthorizationRule{ + _, err = namespacesClient.CreateOrUpdateAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.authorizationRuleName, armservicebus.SBAuthorizationRule{ Properties: &armservicebus.SBAuthorizationRuleProperties{ Rights: []*armservicebus.AccessRights{ to.Ptr(armservicebus.AccessRightsListen), @@ -342,24 +344,24 @@ func (testsuite *NamespaceTestSuite) TestNamespacesAuthorization() { // From step Namespaces_GetAuthorizationRule fmt.Println("Call operation: Namespaces_GetAuthorizationRule") - _, err = namespacesClient.GetAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, authorizationRuleName, nil) + _, err = namespacesClient.GetAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) // From step Namespaces_ListKeys fmt.Println("Call operation: Namespaces_ListKeys") - _, err = namespacesClient.ListKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, authorizationRuleName, nil) + _, err = namespacesClient.ListKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) // From step Namespaces_RegenerateKeys fmt.Println("Call operation: Namespaces_RegenerateKeys") - _, err = namespacesClient.RegenerateKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, authorizationRuleName, armservicebus.RegenerateAccessKeyParameters{ + _, err = namespacesClient.RegenerateKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.authorizationRuleName, armservicebus.RegenerateAccessKeyParameters{ KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey), }, nil) testsuite.Require().NoError(err) // From step Namespaces_DeleteAuthorizationRule fmt.Println("Call operation: Namespaces_DeleteAuthorizationRule") - _, err = namespacesClient.DeleteAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, authorizationRuleName, nil) + _, err = namespacesClient.DeleteAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) } diff --git a/sdk/resourcemanager/servicebus/armservicebus/operations_live_test.go b/sdk/resourcemanager/servicebus/armservicebus/operations_live_test.go index 4bdc63660cd0..2971c19fc1a0 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/operations_live_test.go +++ b/sdk/resourcemanager/servicebus/armservicebus/operations_live_test.go @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" "github.com/stretchr/testify/suite" @@ -34,9 +35,9 @@ func (testsuite *OperationsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/servicebus/armservicebus/queue_live_test.go b/sdk/resourcemanager/servicebus/armservicebus/queue_live_test.go index 27c96433d213..338c8f07999b 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/queue_live_test.go +++ b/sdk/resourcemanager/servicebus/armservicebus/queue_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" "github.com/stretchr/testify/suite" @@ -22,14 +23,15 @@ import ( type QueueTestSuite struct { suite.Suite - ctx context.Context - cred azcore.TokenCredential - options *arm.ClientOptions - namespaceName string - queueName string - location string - resourceGroupName string - subscriptionId string + ctx context.Context + cred azcore.TokenCredential + options *arm.ClientOptions + namespaceName string + queueName string + authorizationRuleName string + location string + resourceGroupName string + subscriptionId string } func (testsuite *QueueTestSuite) SetupSuite() { @@ -37,11 +39,12 @@ func (testsuite *QueueTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.namespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "namespac", 6) - testsuite.queueName = testutil.GenerateAlphaNumericID(testsuite.T(), "queuenam", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.namespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespac", 14, false) + testsuite.queueName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "queuenam", 14, false) + testsuite.authorizationRuleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "queueauthoriz", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -112,13 +115,12 @@ func (testsuite *QueueTestSuite) TestQueues() { // Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{authorizationRuleName} func (testsuite *QueueTestSuite) TestQueuesAuthorization() { - authorizationRuleName := testutil.GenerateAlphaNumericID(testsuite.T(), "queueauthoriz", 6) var err error // From step Queues_CreateOrUpdateAuthorizationRule fmt.Println("Call operation: Queues_CreateOrUpdateAuthorizationRule") queuesClient, err := armservicebus.NewQueuesClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - _, err = queuesClient.CreateOrUpdateAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, authorizationRuleName, armservicebus.SBAuthorizationRule{ + _, err = queuesClient.CreateOrUpdateAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, testsuite.authorizationRuleName, armservicebus.SBAuthorizationRule{ Properties: &armservicebus.SBAuthorizationRuleProperties{ Rights: []*armservicebus.AccessRights{ to.Ptr(armservicebus.AccessRightsListen), @@ -129,19 +131,19 @@ func (testsuite *QueueTestSuite) TestQueuesAuthorization() { // From step Queues_GetAuthorizationRule fmt.Println("Call operation: Queues_GetAuthorizationRule") - _, err = queuesClient.GetAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, authorizationRuleName, nil) + _, err = queuesClient.GetAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) // From step Queues_RegenerateKeys fmt.Println("Call operation: Queues_RegenerateKeys") - _, err = queuesClient.RegenerateKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, authorizationRuleName, armservicebus.RegenerateAccessKeyParameters{ + _, err = queuesClient.RegenerateKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, testsuite.authorizationRuleName, armservicebus.RegenerateAccessKeyParameters{ KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey), }, nil) testsuite.Require().NoError(err) // From step Queues_ListKeys fmt.Println("Call operation: Queues_ListKeys") - _, err = queuesClient.ListKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, authorizationRuleName, nil) + _, err = queuesClient.ListKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) // From step Queues_ListAuthorizationRules @@ -155,7 +157,7 @@ func (testsuite *QueueTestSuite) TestQueuesAuthorization() { // From step Queues_DeleteAuthorizationRule fmt.Println("Call operation: Queues_DeleteAuthorizationRule") - _, err = queuesClient.DeleteAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, authorizationRuleName, nil) + _, err = queuesClient.DeleteAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.queueName, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) } diff --git a/sdk/resourcemanager/servicebus/armservicebus/rules_live_test.go b/sdk/resourcemanager/servicebus/armservicebus/rules_live_test.go index fdfa80889e33..16daa0b06ade 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/rules_live_test.go +++ b/sdk/resourcemanager/servicebus/armservicebus/rules_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" "github.com/stretchr/testify/suite" @@ -28,6 +29,7 @@ type RulesTestSuite struct { namespaceName string subscriptionName string topicName string + ruleName string location string resourceGroupName string subscriptionId string @@ -38,12 +40,13 @@ func (testsuite *RulesTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.namespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "namespac", 6) - testsuite.subscriptionName = testutil.GenerateAlphaNumericID(testsuite.T(), "subscrip", 6) - testsuite.topicName = testutil.GenerateAlphaNumericID(testsuite.T(), "topicnam", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.namespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespac", 14, false) + testsuite.subscriptionName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "subscrip", 14, false) + testsuite.topicName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "topicnam", 14, false) + testsuite.ruleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "rulename", 14, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -102,13 +105,12 @@ func (testsuite *RulesTestSuite) Prepare() { // providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName} func (testsuite *RulesTestSuite) TestRules() { - ruleName := testutil.GenerateAlphaNumericID(testsuite.T(), "rulename", 6) var err error // From step Rules_CreateOrUpdate fmt.Println("Call operation: Rules_CreateOrUpdate") rulesClient, err := armservicebus.NewRulesClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - _, err = rulesClient.CreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.subscriptionName, ruleName, armservicebus.Rule{}, nil) + _, err = rulesClient.CreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.subscriptionName, testsuite.ruleName, armservicebus.Rule{}, nil) testsuite.Require().NoError(err) // From step Rules_ListBySubscriptions @@ -124,11 +126,11 @@ func (testsuite *RulesTestSuite) TestRules() { // From step Rules_Get fmt.Println("Call operation: Rules_Get") - _, err = rulesClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.subscriptionName, ruleName, nil) + _, err = rulesClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.subscriptionName, testsuite.ruleName, nil) testsuite.Require().NoError(err) // From step Rules_Delete fmt.Println("Call operation: Rules_Delete") - _, err = rulesClient.Delete(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.subscriptionName, ruleName, nil) + _, err = rulesClient.Delete(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.subscriptionName, testsuite.ruleName, nil) testsuite.Require().NoError(err) } diff --git a/sdk/resourcemanager/servicebus/armservicebus/subscriptions_live_test.go b/sdk/resourcemanager/servicebus/armservicebus/subscriptions_live_test.go index b91e3b17f435..b4f9961e8f78 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/subscriptions_live_test.go +++ b/sdk/resourcemanager/servicebus/armservicebus/subscriptions_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" "github.com/stretchr/testify/suite" @@ -27,6 +28,7 @@ type SubscriptionsTestSuite struct { options *arm.ClientOptions namespaceName string topicName string + subscriptionName string location string resourceGroupName string subscriptionId string @@ -37,11 +39,12 @@ func (testsuite *SubscriptionsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.namespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "namespac", 6) - testsuite.topicName = testutil.GenerateAlphaNumericID(testsuite.T(), "topicnam", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.namespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespac", 14, false) + testsuite.topicName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "topicnam", 14, false) + testsuite.subscriptionName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "subscrip", 14, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -89,13 +92,12 @@ func (testsuite *SubscriptionsTestSuite) Prepare() { // Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName} func (testsuite *SubscriptionsTestSuite) TestSubscriptions() { - subscriptionName := testutil.GenerateAlphaNumericID(testsuite.T(), "subscrip", 6) var err error // From step Subscriptions_CreateOrUpdate fmt.Println("Call operation: Subscriptions_CreateOrUpdate") subscriptionsClient, err := armservicebus.NewSubscriptionsClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - _, err = subscriptionsClient.CreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, subscriptionName, armservicebus.SBSubscription{ + _, err = subscriptionsClient.CreateOrUpdate(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.subscriptionName, armservicebus.SBSubscription{ Properties: &armservicebus.SBSubscriptionProperties{ EnableBatchedOperations: to.Ptr(true), }, @@ -115,11 +117,11 @@ func (testsuite *SubscriptionsTestSuite) TestSubscriptions() { // From step Subscriptions_Get fmt.Println("Call operation: Subscriptions_Get") - _, err = subscriptionsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, subscriptionName, nil) + _, err = subscriptionsClient.Get(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.subscriptionName, nil) testsuite.Require().NoError(err) // From step Subscriptions_Delete fmt.Println("Call operation: Subscriptions_Delete") - _, err = subscriptionsClient.Delete(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, subscriptionName, nil) + _, err = subscriptionsClient.Delete(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.subscriptionName, nil) testsuite.Require().NoError(err) } diff --git a/sdk/resourcemanager/servicebus/armservicebus/topics_live_test.go b/sdk/resourcemanager/servicebus/armservicebus/topics_live_test.go index f080c1676d30..364bed50398c 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/topics_live_test.go +++ b/sdk/resourcemanager/servicebus/armservicebus/topics_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" "github.com/stretchr/testify/suite" @@ -22,14 +23,15 @@ import ( type TopicsTestSuite struct { suite.Suite - ctx context.Context - cred azcore.TokenCredential - options *arm.ClientOptions - namespaceName string - topicName string - location string - resourceGroupName string - subscriptionId string + ctx context.Context + cred azcore.TokenCredential + options *arm.ClientOptions + namespaceName string + topicName string + authorizationRuleName string + location string + resourceGroupName string + subscriptionId string } func (testsuite *TopicsTestSuite) SetupSuite() { @@ -37,11 +39,12 @@ func (testsuite *TopicsTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) - testsuite.namespaceName = testutil.GenerateAlphaNumericID(testsuite.T(), "namespac", 6) - testsuite.topicName = testutil.GenerateAlphaNumericID(testsuite.T(), "topicnam", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.namespaceName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "namespac", 14, false) + testsuite.topicName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "topicnam", 14, false) + testsuite.authorizationRuleName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "topicauthoriz", 19, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name @@ -112,13 +115,12 @@ func (testsuite *TopicsTestSuite) TestTopics() { // Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName} func (testsuite *TopicsTestSuite) TestTopicsAuthorization() { - authorizationRuleName := testutil.GenerateAlphaNumericID(testsuite.T(), "topicauthoriz", 6) var err error // From step Topics_CreateOrUpdateAuthorizationRule fmt.Println("Call operation: Topics_CreateOrUpdateAuthorizationRule") topicsClient, err := armservicebus.NewTopicsClient(testsuite.subscriptionId, testsuite.cred, testsuite.options) testsuite.Require().NoError(err) - _, err = topicsClient.CreateOrUpdateAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, authorizationRuleName, armservicebus.SBAuthorizationRule{ + _, err = topicsClient.CreateOrUpdateAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.authorizationRuleName, armservicebus.SBAuthorizationRule{ Properties: &armservicebus.SBAuthorizationRuleProperties{ Rights: []*armservicebus.AccessRights{ to.Ptr(armservicebus.AccessRightsListen), @@ -138,24 +140,24 @@ func (testsuite *TopicsTestSuite) TestTopicsAuthorization() { // From step Topics_GetAuthorizationRule fmt.Println("Call operation: Topics_GetAuthorizationRule") - _, err = topicsClient.GetAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, authorizationRuleName, nil) + _, err = topicsClient.GetAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) // From step Topics_ListKeys fmt.Println("Call operation: Topics_ListKeys") - _, err = topicsClient.ListKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, authorizationRuleName, nil) + _, err = topicsClient.ListKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) // From step Topics_RegenerateKeys fmt.Println("Call operation: Topics_RegenerateKeys") - _, err = topicsClient.RegenerateKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, authorizationRuleName, armservicebus.RegenerateAccessKeyParameters{ + _, err = topicsClient.RegenerateKeys(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.authorizationRuleName, armservicebus.RegenerateAccessKeyParameters{ KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey), }, nil) testsuite.Require().NoError(err) // From step Topics_DeleteAuthorizationRule fmt.Println("Call operation: Topics_DeleteAuthorizationRule") - _, err = topicsClient.DeleteAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, authorizationRuleName, nil) + _, err = topicsClient.DeleteAuthorizationRule(testsuite.ctx, testsuite.resourceGroupName, testsuite.namespaceName, testsuite.topicName, testsuite.authorizationRuleName, nil) testsuite.Require().NoError(err) } diff --git a/sdk/resourcemanager/storage/armstorage/assets.json b/sdk/resourcemanager/storage/armstorage/assets.json index c8da6a3db044..799f7afd7fe4 100644 --- a/sdk/resourcemanager/storage/armstorage/assets.json +++ b/sdk/resourcemanager/storage/armstorage/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/storage/armstorage", - "Tag": "go/resourcemanager/storage/armstorage_7be6771f42" + "Tag": "go/resourcemanager/storage/armstorage_c9d59e874d" } diff --git a/sdk/resourcemanager/storage/armstorage/blob_live_test.go b/sdk/resourcemanager/storage/armstorage/blob_live_test.go index 6bfc95e1b571..7f314c1af136 100644 --- a/sdk/resourcemanager/storage/armstorage/blob_live_test.go +++ b/sdk/resourcemanager/storage/armstorage/blob_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" "github.com/stretchr/testify/suite" @@ -37,9 +38,9 @@ func (testsuite *BlobTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) testsuite.accountName = "blobaccountnam" - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/storage/armstorage/file_live_test.go b/sdk/resourcemanager/storage/armstorage/file_live_test.go index ee3e9015657e..645783d8808b 100644 --- a/sdk/resourcemanager/storage/armstorage/file_live_test.go +++ b/sdk/resourcemanager/storage/armstorage/file_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" "github.com/stretchr/testify/suite" @@ -37,9 +38,9 @@ func (testsuite *FileTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) testsuite.accountName = "fileaccountnam" - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/storage/armstorage/go.mod b/sdk/resourcemanager/storage/armstorage/go.mod index cb4a40e8b715..26cb26a69e65 100644 --- a/sdk/resourcemanager/storage/armstorage/go.mod +++ b/sdk/resourcemanager/storage/armstorage/go.mod @@ -5,13 +5,13 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.8.2 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnaeon/go-vcr v1.1.0 // indirect diff --git a/sdk/resourcemanager/storage/armstorage/queue_live_test.go b/sdk/resourcemanager/storage/armstorage/queue_live_test.go index 640c217de4d3..7f9aa03404f6 100644 --- a/sdk/resourcemanager/storage/armstorage/queue_live_test.go +++ b/sdk/resourcemanager/storage/armstorage/queue_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" "github.com/stretchr/testify/suite" @@ -37,9 +38,9 @@ func (testsuite *QueueTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) testsuite.accountName = "queueaccountnam" - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/storage/armstorage/storage_live_test.go b/sdk/resourcemanager/storage/armstorage/storage_live_test.go index 18a7b53b4cf3..a0d80a5bde54 100644 --- a/sdk/resourcemanager/storage/armstorage/storage_live_test.go +++ b/sdk/resourcemanager/storage/armstorage/storage_live_test.go @@ -16,6 +16,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" @@ -42,10 +43,10 @@ func (testsuite *StorageTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) testsuite.accountName = "accountnam" - testsuite.encryptionScopeName = testutil.GenerateAlphaNumericID(testsuite.T(), "encryption", 6) - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.encryptionScopeName, _ = recording.GenerateAlphaNumericID(testsuite.T(), "encryption", 16, false) + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name diff --git a/sdk/resourcemanager/storage/armstorage/table_live_test.go b/sdk/resourcemanager/storage/armstorage/table_live_test.go index a59883066d5a..5a5177594b4e 100644 --- a/sdk/resourcemanager/storage/armstorage/table_live_test.go +++ b/sdk/resourcemanager/storage/armstorage/table_live_test.go @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/testutil" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" "github.com/stretchr/testify/suite" @@ -37,9 +38,9 @@ func (testsuite *TableTestSuite) SetupSuite() { testsuite.ctx = context.Background() testsuite.cred, testsuite.options = testutil.GetCredAndClientOptions(testsuite.T()) testsuite.accountName = "tableaccountnam" - testsuite.location = testutil.GetEnv("LOCATION", "westus") - testsuite.resourceGroupName = testutil.GetEnv("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") - testsuite.subscriptionId = testutil.GetEnv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + testsuite.location = recording.GetEnvVariable("LOCATION", "westus") + testsuite.resourceGroupName = recording.GetEnvVariable("RESOURCE_GROUP_NAME", "scenarioTestTempGroup") + testsuite.subscriptionId = recording.GetEnvVariable("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") resourceGroup, _, err := testutil.CreateResourceGroup(testsuite.ctx, testsuite.subscriptionId, testsuite.cred, testsuite.options, testsuite.location) testsuite.Require().NoError(err) testsuite.resourceGroupName = *resourceGroup.Name