Skip to content
Open
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
Expand Up @@ -28,8 +28,8 @@ public BatchApplicationPackageTests(Xunit.Abstractions.ITestOutputHelper output)

}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Fact(Skip = "Successful re-recording, but fails in playback. See issue https://github.com/Azure/azure-powershell/issues/7512")]
[Trait(Category.AcceptanceType, Category.LiveOnly)]
public void TestUploadApplicationPackage()
{
string id = "newApplicationPackage";
Expand All @@ -51,6 +51,29 @@ public void TestUploadApplicationPackage()
);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUploadApplicationPackageActivateOnly()
{
string id = "newApplicationPackage";

BatchAccountContext context = null;
TestRunner.RunTestScript(
null,
mockContext =>
{
context = new ScenarioTestContext();
ScenarioTestHelpers.CreateApplicationPackage(this, context, id, version, filePath);
},
() =>
{
ScenarioTestHelpers.DeleteApplicationPackage(this, context, id, version);
ScenarioTestHelpers.DeleteApplication(this, context, id);
},
$"Test-UploadApplicationPackageActivateOnly '{id}' '{version}' '{filePath}'"
);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateApplicationPackage()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ function Test-UploadApplicationPackage
# Setup
$context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext

$addAppPack = New-AzBatchApplicationPackage -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationName $applicationName -ApplicationVersion $applicationVersion -format "zip" -FilePath $filePath
$subId = $context.Subscription
$resourceGroup = $context.ResourceGroupName
$batchAccountName = $context.AccountName

Assert-AreEqual "/subscriptions/$subId/resourceGroups/$resourceGroup/providers/Microsoft.Batch/batchAccounts/$batchAccountName/applications/$applicationName/versions/$applicationVersion" $addAppPack.Id
Assert-AreEqual $applicationVersion $addAppPack.Name
}

<#
.SYNOPSIS
Tests uploading an application package.
#>
function Test-UploadApplicationPackageActivateOnly
{
param([string] $applicationName, [string] $applicationVersion, [string]$filePath)

# Setup
$context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext

$addAppPack = New-AzBatchApplicationPackage -ResourceGroupName $context.ResourceGroupName -AccountName $context.AccountName -ApplicationName $applicationName -ApplicationVersion $applicationVersion -format "zip" -ActivateOnly
$subId = $context.Subscription
$resourceGroup = $context.ResourceGroupName
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Loading