Skip to content
Merged
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<!-- Please do not move/edit code below this line -->
<Import Project="$(RepoEngPath)/mgmt/AzSdk.reference.props" />
<!-- Please do not move/edit code below this line -->
Expand Down Expand Up @@ -31,4 +31,4 @@
<!-- Please do not move/edit code below this line -->
<Import Condition=" Exists('$([MSBuild]::GetPathOfFileAbove(AzSdk.RP.props))') " Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.RP.props'))" />
<!-- Please do not move/edit code above this line -->
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ public void TestCloudServiceScenarioOperations_ExtensionProfile()
}
}

[Fact]
[Trait("Name", "TestCloudServiceScenarioOperations_AvailabilityZones")]
public void TestCloudServiceScenarioOperations_AvailabilityZones()
{
using (MockContext context = MockContext.Start(this.GetType()))
{
TestCloudServiceOperationsInternal(context, zones: new List<string>() { "1" });
}
}

[Fact]
[Trait("Name", "TestCloudServiceScenarioOperations_InstanceView")]
public void TestCloudServiceScenarioOperations_InstanceView()
Expand All @@ -70,7 +80,7 @@ public void TestCloudServiceScenarioOperations_InstanceView()
}
}

private void TestCloudServiceOperationsInternal(MockContext context, CloudServiceExtensionProfile extensionProfile = null, bool validateInstanceView = false, bool deleteAsPartOfTest = false)
private void TestCloudServiceOperationsInternal(MockContext context, CloudServiceExtensionProfile extensionProfile = null, bool validateInstanceView = false, bool deleteAsPartOfTest = false, List<string> zones = null)
{
EnsureClientsInitialized(context);

Expand Down Expand Up @@ -118,6 +128,7 @@ private void TestCloudServiceOperationsInternal(MockContext context, CloudServic
{
cloudService.Properties.ExtensionProfile = extensionProfile;
}
cloudService.Zones = zones;

CloudService getResponse = CreateCloudService_NoAsyncTracking(
rgName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class CloudServiceTestsBase : VMTestBase, IDisposable
public CloudServiceTestsBase()
{
originalLocation = Environment.GetEnvironmentVariable("AZURE_VM_TEST_LOCATION");
Environment.SetEnvironmentVariable("AZURE_VM_TEST_LOCATION", "eastus2");
Environment.SetEnvironmentVariable("AZURE_VM_TEST_LOCATION", "eastus2euap");
}

public void Dispose()
Expand Down Expand Up @@ -246,6 +246,16 @@ protected void ValidateCloudService(CloudService cloudService, CloudService clou
Assert.True((cloudServiceOut.Properties.RoleProfile == null));
}

if (cloudService.Zones != null)
{
Assert.NotNull(cloudServiceOut.Zones);
Assert.Equal(cloudServiceOut.Zones.Count, cloudServiceOut.Zones.Count);
Assert.True(cloudService.Zones.All(cloudServiceOut.Zones.Contains));
}
else
{
Assert.Null(cloudServiceOut.Zones);
}
}

protected VirtualNetwork CreateVirtualNetwork(string resourceGroupName, string vnetName, string subnetName)
Expand Down Expand Up @@ -421,7 +431,7 @@ protected CloudServiceNetworkProfile GenerateNrpCloudServiceNetworkProfile(strin
Name = lbName,
Properties = new LoadBalancerConfigurationProperties()
{
FrontendIPConfigurations = new List<LoadBalancerFrontendIPConfiguration>()
FrontendIpConfigurations = new List<LoadBalancerFrontendIpConfiguration>()
{
feipConfig
}
Expand All @@ -433,13 +443,13 @@ protected CloudServiceNetworkProfile GenerateNrpCloudServiceNetworkProfile(strin
return cloudServiceNetworkProfile;
}

protected LoadBalancerFrontendIPConfiguration GenerateFrontEndIpConfigurationModel(string publicIPAddressName, string resourceGroupName, string lbFrontEndName)
protected LoadBalancerFrontendIpConfiguration GenerateFrontEndIpConfigurationModel(string publicIPAddressName, string resourceGroupName, string lbFrontEndName)
{
LoadBalancerFrontendIPConfiguration feipConfiguration =
new LoadBalancerFrontendIPConfiguration()
LoadBalancerFrontendIpConfiguration feipConfiguration =
new LoadBalancerFrontendIpConfiguration()
{
Name = lbFrontEndName,
Properties = new LoadBalancerFrontendIPConfigurationProperties()
Properties = new LoadBalancerFrontendIpConfigurationProperties()
{
PublicIPAddress = new CM.SubResource()
{
Expand Down
Loading