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

[AutoPR Az.webpubsub.DefaultTag] Azure SignalR - Adding new api-version 2024-01-01-preview #6053

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"properties": {
"type": "AzureFunction",
"typeProperties": {
"functionAppUrl": "fakeurl",
"authentication": "MSI",
"resourceId": "fakeResourceId"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"properties": {
"activities": [
{
"name": "Web1",
"type": "WebActivity",
"dependsOn": [],
"policy": {
"timeout": "0.12:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"method": "GET",
"url": "https://localhost"
}
},
{
"name": "Azure Function1",
"type": "AzureFunctionActivity",
"dependsOn": [],
"policy": {
"timeout": "0.12:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"functionName": "test1",
"method": "GET"
},
"linkedServiceName": {
"referenceName": "foo1",
"type": "LinkedServiceReference"
}
}
],
"annotations": []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,12 @@ public void TestPipelineWithResourceIdV2()
{
TestRunner.RunTestScript("Test-PipelineWithResourceId");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestPipelineWithExistsActivityV2()
{
TestRunner.RunTestScript("Test-PipelineWithExistsActivity");
}
}
}
41 changes: 41 additions & 0 deletions src/DataFactory/DataFactoryV2.Test/ScenarioTests/PipelineTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,45 @@ function Test-PipelineWithResourceId
{
CleanUp $rgname $dfname
}
}

<#
.SYNOPSIS
Creates a sample pipeline with all of its dependencies. Then does a Get to compare the results.
Delete sthe created pipeline with resource id at the end.
#>
function Test-PipelineWithExistsActivity
{
$dfname = Get-DataFactoryName
$rgname = Get-ResourceGroupName
$rglocation = Get-ProviderLocation ResourceManagement
$dflocation = Get-ProviderLocation DataFactoryManagement

$endDate = [DateTime]::Parse("9/8/2014")
$startDate = $endDate.AddHours(-1)

New-AzResourceGroup -Name $rgname -Location $rglocation -Force

try
{
$df = Set-AzDataFactoryV2 -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force

$lsName = "foo1"
Set-AzDataFactoryV2LinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -File .\Resources\linkedService-AzureFunction.json -Name $lsName -Force

$pipelineName = "samplePipeline"
$actual = Set-AzDataFactoryV2Pipeline -ResourceGroupName $rgname -Name $pipelineName -DataFactoryName $dfname -File ".\Resources\pipelineExistsActivity.json" -Force

$expected = Get-AzDataFactoryV2Pipeline -ResourceId $actual.Id

Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName
Assert-AreEqual $expected.DataFactoryName $actual.DataFactoryName
Assert-AreEqual $expected.Name $actual.Name

Remove-AzDataFactoryV2Pipeline -ResourceId $actual.Id -Force
}
finally
{
CleanUp $rgname $dfname
}
}
Loading