Skip to content

Commit a05c75d

Browse files
authored
Merge pull request #8485 from jaredmoo/dbUpdateExample
Changed Set-AzSqlDatabase example to use S0
2 parents e2c0f1b + b483315 commit a05c75d

File tree

155 files changed

+30801
-48554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+30801
-48554
lines changed

src/LogicApp/LogicApp.Test/LogicApp.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Azure.Management.Logic" Version="3.0.1" />
14+
<PackageReference Include="Microsoft.Azure.Management.Logic" Version="4.1.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>
Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,25 @@
11
{
2-
"$schema":"http://schema.management.azure.com/providers/Microsoft.Logic/schemas/2014-12-01-preview/workflowdefinition.json#",
3-
"contentVersion":"1.0.0.0",
4-
"parameters":{
5-
"runworkflowmanually":{
6-
"defaultValue":true,
7-
"type":"bool"
8-
},
9-
"subscription":{
10-
"defaultValue":"1a66ce04-b633-4a0b-b2bc-a912ec8986a6",
11-
"type":"string"
12-
},
13-
"resourceGroup":{
14-
"defaultValue":"logicapps-e2e",
15-
"type":"string"
16-
},
17-
"authentication":{
18-
"defaultValue":{
19-
"type":"ActiveDirectoryOAuth",
20-
"audience":"https://management.azure.com/",
21-
"tenant":"72f988bf-86f1-41af-91ab-2d7cd011db47",
22-
"clientId":"64011f29-3932-4168-b73d-adc835a56732",
23-
"secret":"q8Wf7SwoM4iSVgaHZdghScLX8xDxMMUATWvRalclJjo="
24-
},
25-
"type":"object"
26-
}
27-
},
28-
"triggers":{
29-
},
30-
"actions":{
31-
"listWorkflows":{
32-
"type":"Http",
33-
"inputs":{
34-
"method":"GET",
35-
"uri":"someUri",
36-
"authentication":"@parameters('authentication')"
37-
},
38-
"conditions":[
39-
40-
]
41-
}
42-
},
43-
"outputs":{
2+
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2015-08-01-preview/workflowdefinition.json#",
3+
"actions": {
4+
"HTTP": {
5+
"conditions": [],
6+
"inputs": {
7+
"method": "GET",
8+
"uri": "http://www.bing.com"
9+
},
10+
"type": "Http"
4411
}
12+
},
13+
"contentVersion": "1.0.0.0",
14+
"outputs": {},
15+
"parameters": {},
16+
"triggers": {
17+
"Recurrence": {
18+
"recurrence": {
19+
"frequency": "Minute",
20+
"interval": 3
21+
},
22+
"type": "Recurrence"
23+
}
24+
}
4525
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"destinationUri": {
3-
"value": "http://requestb.in/1kj7g8e1"
4-
}
2+
"destinationUri": {
3+
"value": "http://requestb.in/1kj7g8e1"
4+
}
55
}

src/LogicApp/LogicApp.Test/ScenarioTests/Common.ps1

Lines changed: 15 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -13,58 +13,16 @@
1313

1414
<#
1515
.SYNOPSIS
16-
Gets valid resource group name
17-
#>
18-
function Get-ResourceGroupName
19-
{
20-
return getAssetName
21-
}
22-
23-
<#
24-
.SYNOPSIS
25-
Gets valid resource name
26-
#>
27-
function Get-ResourceName
28-
{
29-
return getAssetName
30-
}
31-
32-
<#
33-
.SYNOPSIS
34-
Gets the default location for a provider
16+
Creates a resource group to use in tests
3517
#>
36-
function Get-ProviderLocation($provider)
18+
function CurrentApiVersion
3719
{
38-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
39-
{
40-
$namespace = $provider.Split("/")[0]
41-
if($provider.Contains("/"))
42-
{
43-
$type = $provider.Substring($namespace.Length + 1)
44-
$location = Get-AzResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type}
45-
46-
if ($location -eq $null)
47-
{
48-
return "West US"
49-
} else
50-
{
51-
return $location.Locations[0]
52-
}
53-
}
54-
55-
return "West US"
56-
}
57-
58-
return "WestUS"
20+
return "2018-07-01-preview"
5921
}
6022

61-
<#
62-
.SYNOPSIS
63-
Gets the default test location name.
64-
#>
65-
function Get-LocationName()
23+
function SampleMetadata
6624
{
67-
return 'brazilsouth'
25+
return @{ "key1" = "value1"; "key2" = "value2"; "key3" = "value3"; }
6826
}
6927

7028
<#
@@ -73,53 +31,20 @@ Creates a resource group to use in tests
7331
#>
7432
function TestSetup-CreateResourceGroup
7533
{
76-
$resourceGroupName = getAssetName
77-
$rglocation = Get-ProviderLocation "North Europe"
78-
$resourceGroup = New-AzResourceGroup -Name $resourceGroupName -location $rglocation -Force
79-
80-
return $resourceGroup
81-
}
34+
$resourceGroupName = "RG-" + (getAssetname)
35+
$location = Get-Location "Microsoft.Resources" "resourceGroups" "West US"
36+
$resourceGroup = New-AzResourceGroup -Name $resourceGroupName -location $location
8237

83-
<#
84-
.SYNOPSIS
85-
Creates named resource group to use in tests
86-
#>
87-
function TestSetup-CreateNamedResourceGroup([string]$resourceGroupName)
88-
{
89-
$location = Get-LocationName
90-
$resourceGroup = New-AzResourceGroup -Name $resourceGroupName -location $location -Force
91-
9238
return $resourceGroup
9339
}
9440

95-
<#
96-
.SYNOPSIS
97-
Creates an App Service Plan
98-
#>
99-
function TestSetup-CreateAppServicePlan ([string]$resourceGroupName, [string]$AppServicePlan)
100-
{
101-
if(Test-Path Env:AZURE_TEST_MODE)
102-
{
103-
$AZURE_TEST_MODE = Get-ChildItem Env:AZURE_TEST_MODE
104-
if($AZURE_TEST_MODE.Value.ToLowerInvariant() -eq 'record')
105-
{
106-
$PropertiesObject = @{}
107-
$Sku = @{Name='S1'; Tier='Standard'; Size='S1'; Family='S'; Capacity=1}
108-
$Plan = New-AzResource -Name $AppServicePlan -Location "West US" -ResourceGroupName $resourceGroupName -ResourceType "Microsoft.Web/serverfarms" -ApiVersion 2015-08-01 -SkuObject $Sku -PropertyObject $PropertiesObject -Force
109-
return $Plan
110-
}
111-
}
112-
return $null
113-
}
114-
115-
11641
<#
11742
.SYNOPSIS
11843
Creates a new Integration account
11944
#>
12045
function TestSetup-CreateIntegrationAccount ([string]$resourceGroupName, [string]$integrationAccountName)
121-
{
122-
$location = Get-LocationName
46+
{
47+
$location = Get-Location "Microsoft.Logic" "integrationAccounts" "West US"
12348
$integrationAccount = New-AzIntegrationAccount -ResourceGroupName $resourceGroupName -IntegrationAccountName $integrationAccountName -Location $location -Sku "Standard"
12449
return $integrationAccount
12550
}
@@ -129,15 +54,13 @@ function TestSetup-CreateIntegrationAccount ([string]$resourceGroupName, [string
12954
Creates a new workflow
13055
#>
13156
function TestSetup-CreateWorkflow ([string]$resourceGroupName, [string]$workflowName, [string]$AppServicePlan)
132-
{
133-
$rglocation = Get-ProviderLocation "North Europe"
57+
{
58+
$location = Get-Location "Microsoft.Logic" "workflows" "West US"
13459
$resourceGroup = New-AzResourceGroup -Name $resourceGroupName -location $rglocation -Force
13560

136-
TestSetup-CreateAppServicePlan $resourceGroupName $AppServicePlan
137-
13861
$definitionFilePath = Join-Path "Resources" "TestSimpleWorkflowDefinition.json"
13962
$parameterFilePath = Join-Path "Resources" "TestSimpleWorkflowParameter.json"
140-
$workflow = $resourceGroup | New-AzLogicApp -Name $workflowName -Location $WORKFLOW_LOCATION -DefinitionFilePath $definitionFilePath -ParameterFilePath $parameterFilePath
63+
$workflow = $resourceGroup | New-AzLogicApp -Name $workflowName -Location $location -DefinitionFilePath $definitionFilePath -ParameterFilePath $parameterFilePath
14164
return $workflow
14265
}
14366

@@ -149,7 +72,7 @@ function SleepInRecordMode ([int]$SleepIntervalInMillisec)
14972
{
15073
$mode = $env:AZURE_TEST_MODE
15174
if ( $mode -ne $null -and $mode.ToUpperInvariant() -eq "RECORD")
152-
{
75+
{
15376
Sleep -Milliseconds $SleepIntervalInMillisec
154-
}
77+
}
15578
}

src/LogicApp/LogicApp.Test/ScenarioTests/IntegrationAccountAgreementTests.cs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public IntegrationAccountAgreementTests(Xunit.Abstractions.ITestOutputHelper out
3737
/// </summary>
3838
[Fact]
3939
[Trait(Category.AcceptanceType, Category.CheckIn)]
40-
public void TestCreateIntegrationAccountAgreementX12()
40+
public void TestCreateAgreementX12()
4141
{
4242
WorkflowController.NewInstance.RunPowerShellTest(_logger, "Test-CreateIntegrationAccountAgreementX12");
4343
}
@@ -47,18 +47,17 @@ public void TestCreateIntegrationAccountAgreementX12()
4747
/// </summary>
4848
[Fact]
4949
[Trait(Category.AcceptanceType, Category.CheckIn)]
50-
public void TestCreateIntegrationAccountAgreementWithFailure()
50+
public void TestCreateAgreementWithFailure()
5151
{
52-
WorkflowController.NewInstance.RunPowerShellTest(
53-
_logger, "Test-CreateIntegrationAccountAgreementWithFailure");
52+
WorkflowController.NewInstance.RunPowerShellTest(_logger, "Test-CreateIntegrationAccountAgreementWithFailure");
5453
}
5554

5655
/// <summary>
5756
/// Test New-AzIntegrationAccountAgreement command to create a new AS2 integration account agreement.
5857
/// </summary>
5958
[Fact]
6059
[Trait(Category.AcceptanceType, Category.CheckIn)]
61-
public void TestCreateIntegrationAccountAgreementAs2()
60+
public void TestCreateAgreementAs2()
6261
{
6362
WorkflowController.NewInstance.RunPowerShellTest(_logger, "Test-CreateIntegrationAccountAgreementAS2");
6463
}
@@ -68,7 +67,7 @@ public void TestCreateIntegrationAccountAgreementAs2()
6867
/// </summary>
6968
[Fact]
7069
[Trait(Category.AcceptanceType, Category.CheckIn)]
71-
public void TestCreateIntegrationAccountAgreementEdifact()
70+
public void TestCreateAgreementEdifact()
7271
{
7372
WorkflowController.NewInstance.RunPowerShellTest(_logger, "Test-CreateIntegrationAccountAgreementEdifact");
7473
}
@@ -78,7 +77,7 @@ public void TestCreateIntegrationAccountAgreementEdifact()
7877
/// </summary>
7978
[Fact]
8079
[Trait(Category.AcceptanceType, Category.CheckIn)]
81-
public void TestGetIntegrationAccountAgreement()
80+
public void TestGetAgreement()
8281
{
8382
WorkflowController.NewInstance.RunPowerShellTest(_logger, "Test-GetIntegrationAccountAgreement");
8483
}
@@ -88,17 +87,17 @@ public void TestGetIntegrationAccountAgreement()
8887
/// </summary>
8988
[Fact]
9089
[Trait(Category.AcceptanceType, Category.CheckIn)]
91-
public void TestRemoveIntegrationAccountAgreement()
90+
public void TestRemoveAgreement()
9291
{
9392
WorkflowController.NewInstance.RunPowerShellTest(_logger, "Test-RemoveIntegrationAccountAgreement");
94-
}
93+
}
9594

9695
/// <summary>
9796
/// Test Set-AzIntegrationAccountAgreement command to update the integration account agreement.
9897
/// </summary>
9998
[Fact]
10099
[Trait(Category.AcceptanceType, Category.CheckIn)]
101-
public void TestUpdateIntegrationAccountAgreement()
100+
public void TestUpdateAgreement()
102101
{
103102
WorkflowController.NewInstance.RunPowerShellTest(_logger, "Test-UpdateIntegrationAccountAgreement");
104103
}
@@ -108,10 +107,9 @@ public void TestUpdateIntegrationAccountAgreement()
108107
/// </summary>
109108
[Fact]
110109
[Trait(Category.AcceptanceType, Category.CheckIn)]
111-
public void TestListIntegrationAccountAgreement()
110+
public void TestListAgreement()
112111
{
113112
WorkflowController.NewInstance.RunPowerShellTest(_logger, "Test-ListIntegrationAccountAgreement");
114113
}
115114
}
116-
}
117-
115+
}

0 commit comments

Comments
 (0)