Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Resources][Sql] Fix tests #26432

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix resources
  • Loading branch information
Yao725 committed Jan 18, 2022
commit cc6b983a60f5a52959ae52f390cd57a366a428e1

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ResourceGroupCollection rgCollection = subscription.GetResourceGroups();
// With the collection, we can create a new resource group with an specific name
string rgName = "myRgName";
AzureLocation location = AzureLocation.WestUS2;
ResourceGroupCreateOrUpdateOperation lro = await rgCollection.CreateOrUpdateAsync(rgName, new ResourceGroupData(location));
ResourceGroupCreateOrUpdateOperation lro = await rgCollection.CreateOrUpdateAsync(true, rgName, new ResourceGroupData(location));
ResourceGroup resourceGroup = lro.Value;
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ResourceGroupCollection rgCollection = subscription.GetResourceGroups();
// With the collection, we can create a new resource group with an specific name
string rgName = "myRgName";
AzureLocation location = AzureLocation.WestUS2;
ResourceGroupCreateOrUpdateOperation lro = await rgCollection.CreateOrUpdateAsync(rgName, new ResourceGroupData(location));
ResourceGroupCreateOrUpdateOperation lro = await rgCollection.CreateOrUpdateAsync(true, rgName, new ResourceGroupData(location));
ResourceGroup resourceGroup = lro.Value;
```

Expand Down Expand Up @@ -55,7 +55,7 @@ var input = new DeploymentInput(new DeploymentProperties(DeploymentMode.Incremen
}
}
});
DeploymentCreateOrUpdateAtScopeOperation lro = await deploymentCollection.CreateOrUpdateAsync(true, deploymentName, input);
DeploymentCreateOrUpdateOperation lro = await deploymentCollection.CreateOrUpdateAsync(true, deploymentName, input);
Deployment deployment = lro.Value;
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ protected async Task<DeploymentScriptData> GetDeploymentScriptDataAsync()
string rgName4Identities = "rg-for-DeployScript";
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
Subscription sub = await Client.GetDefaultSubscriptionAsync();
var lro = await sub.GetResourceGroups().CreateOrUpdateAsync(rgName4Identities, rgData);
var lro = await sub.GetResourceGroups().CreateOrUpdateAsync(true, rgName4Identities, rgData);
ResourceGroup rg4Identities = lro.Value;
GenericResourceData userAssignedIdentitiesData = ConstructGenericUserAssignedIdentities();
ResourceIdentifier userAssignedIdentitiesId = rg4Identities.Id.AppendProviderResource("Microsoft.ManagedIdentity", "userAssignedIdentities", "test-user-assigned-msi");
var lro2 = await sub.GetGenericResources().CreateOrUpdateAsync(userAssignedIdentitiesId, userAssignedIdentitiesData);
var lro2 = await Client.GetGenericResources().CreateOrUpdateAsync(true, userAssignedIdentitiesId, userAssignedIdentitiesData);
GenericResource userAssignedIdentities = lro2.Value;
var managedIdentity = new ManagedServiceIdentity()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected async Task initialize()
// With the collection, we can create a new resource group with an specific name
string rgName = "myRgName";
AzureLocation location = AzureLocation.WestUS2;
ResourceGroupCreateOrUpdateOperation lro = await rgCollection.CreateOrUpdateAsync(rgName, new ResourceGroupData(location));
ResourceGroupCreateOrUpdateOperation lro = await rgCollection.CreateOrUpdateAsync(true, rgName, new ResourceGroupData(location));
ResourceGroup resourceGroup = lro.Value;
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task CreateDeployments()
}
}
});
DeploymentCreateOrUpdateAtScopeOperation lro = await deploymentCollection.CreateOrUpdateAsync(true, deploymentName, input);
DeploymentCreateOrUpdateOperation lro = await deploymentCollection.CreateOrUpdateAsync(true, deploymentName, input);
Deployment deployment = lro.Value;
#endregion Snippet:Managing_Deployments_CreateADeployment
}
Expand Down Expand Up @@ -86,7 +86,7 @@ protected async Task initialize()
// With the collection, we can create a new resource group with an specific name
string rgName = "myRgName";
AzureLocation location = AzureLocation.WestUS2;
ResourceGroupCreateOrUpdateOperation lro = await rgCollection.CreateOrUpdateAsync(rgName, new ResourceGroupData(location));
ResourceGroupCreateOrUpdateOperation lro = await rgCollection.CreateOrUpdateAsync(true, rgName, new ResourceGroupData(location));
ResourceGroup resourceGroup = lro.Value;

this.resourceGroup = resourceGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public async Task CreateOrUpdate()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-1-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string appDefName = Recording.GenerateAssetName("appDef-C-");
ApplicationDefinitionData appDefData = CreateApplicationDefinitionData(appDefName);
Expand All @@ -44,7 +44,7 @@ public async Task ListByRG()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-2-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string appDefName = Recording.GenerateAssetName("appDef-L-");
ApplicationDefinitionData appDefData = CreateApplicationDefinitionData(appDefName);
Expand All @@ -67,7 +67,7 @@ public async Task ListBySubscription()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-3-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string appDefName = Recording.GenerateAssetName("appDef-L-");
ApplicationDefinitionData appDefData = CreateApplicationDefinitionData(appDefName);
Expand All @@ -93,7 +93,7 @@ public async Task Get()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-4-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string appDefName = Recording.GenerateAssetName("appDef-G-");
ApplicationDefinitionData appDefData = CreateApplicationDefinitionData(appDefName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public async Task CreateOrUpdate()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-1-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string applicationDefinitionName = Recording.GenerateAssetName("appDef-C-");
ApplicationDefinitionData applicationDefinitionData = CreateApplicationDefinitionData(applicationDefinitionName);
Expand All @@ -41,7 +41,7 @@ public async Task List()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-2-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string applicationDefinitionName = Recording.GenerateAssetName("appDef-L-");
ApplicationDefinitionData applicationDefinitionData = CreateApplicationDefinitionData(applicationDefinitionName);
Expand All @@ -61,7 +61,7 @@ public async Task Get()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-3-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string applicationDefinitionName = Recording.GenerateAssetName("appDef-G-");
ApplicationDefinitionData applicationDefinitionData = CreateApplicationDefinitionData(applicationDefinitionName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public async Task Delete()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-4-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string applicationDefinitionName = Recording.GenerateAssetName("appDef-C-");
ApplicationDefinitionData applicationDefinitionData = CreateApplicationDefinitionData(applicationDefinitionName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public async Task Delete()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-5-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string appDefName = Recording.GenerateAssetName("appDef-D-");
ApplicationDefinitionData appDefData = CreateApplicationDefinitionData(appDefName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public async Task CreateOrUpdate()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-1-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployName = Recording.GenerateAssetName("deployEx-C-");
DeploymentInput deploymentData = CreateDeploymentData(CreateDeploymentProperties());
Expand All @@ -41,7 +41,7 @@ public async Task List()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-2-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployName = Recording.GenerateAssetName("deployEx-L-");
DeploymentInput deploymentData = CreateDeploymentData(CreateDeploymentProperties());
Expand All @@ -61,7 +61,7 @@ public async Task Get()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-3-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployName = Recording.GenerateAssetName("deployEx-G-");
DeploymentInput deploymentData = CreateDeploymentData(CreateDeploymentProperties());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public async Task List()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-1-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployName = Recording.GenerateAssetName("deployEx-");
DeploymentInput deploymentData = CreateDeploymentData(CreateDeploymentProperties());
Expand All @@ -43,7 +43,7 @@ public async Task Get()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-2-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployName = Recording.GenerateAssetName("deployEx-");
DeploymentInput deploymentData = CreateDeploymentData(CreateDeploymentProperties());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public async Task Delete()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-4-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployName = Recording.GenerateAssetName("deployEx-D-");
DeploymentInput deploymentData = CreateDeploymentData(CreateDeploymentProperties());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public async Task CreateOrUpdate()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-1-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployScriptName = Recording.GenerateAssetName("deployScript-C-");
DeploymentScriptData deploymentScriptData = await GetDeploymentScriptDataAsync();
Expand All @@ -41,7 +41,7 @@ public async Task ListByRg()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-2-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployScriptName = Recording.GenerateAssetName("deployScript-L-");
DeploymentScriptData deploymentScriptData = await GetDeploymentScriptDataAsync();
Expand All @@ -61,7 +61,7 @@ public async Task ListBySub()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-3-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployScriptName = Recording.GenerateAssetName("deployScript-L-");
DeploymentScriptData deploymentScriptData = await GetDeploymentScriptDataAsync();
Expand All @@ -84,7 +84,7 @@ public async Task Get()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-4-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployScriptName = Recording.GenerateAssetName("deployScript-G-");
DeploymentScriptData deploymentScriptData = await GetDeploymentScriptDataAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public async Task Delete()
Subscription subscription = await Client.GetDefaultSubscriptionAsync();
string rgName = Recording.GenerateAssetName("testRg-5-");
ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS2);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(rgName, rgData);
var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(true, rgName, rgData);
ResourceGroup rg = lro.Value;
string deployScriptName = Recording.GenerateAssetName("deployScript-D-");
DeploymentScriptData deploymentScriptData = await GetDeploymentScriptDataAsync();
Expand Down
Loading