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
16 changes: 2 additions & 14 deletions e2etest/GuestProxyAgentTest/TestCases/TCPPortScalabilityCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,14 @@ namespace GuestProxyAgentTest.TestCases
{
public class TCPPortScalabilityCase : TestCaseBase
{
public TCPPortScalabilityCase(bool imdsSecureChannelEnabled) : base("TCPPortScalabilityCase")
{
ImdsSecureChannelEnabled = imdsSecureChannelEnabled;
}
public TCPPortScalabilityCase() : base("ConfigTCPPortScalability")
{ }

private bool ImdsSecureChannelEnabled { get; set; }

public override async Task StartAsync(TestCaseExecutionContext context)
{
context.TestResultDetails = (await RunScriptViaRunCommandV2Async(context, "ConfigTCPPortScalability.ps1", null!, false)).ToTestResultDetails(context.Logger);
if(!context.TestResultDetails.Succeed)
{
return;
}
// reboot
var vmr = context.VirtualMachineResource;
await vmr.RestartAsync(Azure.WaitUntil.Completed);
List<(string, string)> parameterList = new List<(string, string)>();
parameterList.Add(("imdsSecureChannelEnabled", ImdsSecureChannelEnabled.ToString()));
context.TestResultDetails = (await RunScriptViaRunCommandV2Async(context, "IMDSPingTest.ps1", parameterList, false)).ToTestResultDetails(context.Logger);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ vmImageVersion: latest
scenarios:
- name: BVTScenario
className: GuestProxyAgentTest.TestScenarios.BVTScenario
- name: BugFixesScenario
className: GuestProxyAgentTest.TestScenarios.BugFixesScenario
- name: TCPPortScalabilityScenario
className: GuestProxyAgentTest.TestScenarios.TCPPortScalabilityScenario
- name: ProxyAgentExtension
className: GuestProxyAgentTest.TestScenarios.ProxyAgentExtension

4 changes: 2 additions & 2 deletions e2etest/GuestProxyAgentTest/TestMap/WinClient11-TestGroup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ vmImageVersion: latest
scenarios:
- name: BVTScenario
className: GuestProxyAgentTest.TestScenarios.BVTScenario
- name: BugFixesScenario
className: GuestProxyAgentTest.TestScenarios.BugFixesScenario
- name: TCPPortScalabilityScenario
className: GuestProxyAgentTest.TestScenarios.TCPPortScalabilityScenario
- name: ProxyAgentExtension
className: GuestProxyAgentTest.TestScenarios.ProxyAgentExtension
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ vmImageVersion: latest
scenarios:
- name: BVTScenario
className: GuestProxyAgentTest.TestScenarios.BVTScenario
- name: BugFixesScenario
className: GuestProxyAgentTest.TestScenarios.BugFixesScenario
- name: TCPPortScalabilityScenario
className: GuestProxyAgentTest.TestScenarios.TCPPortScalabilityScenario
- name: ProxyAgentExtension
className: GuestProxyAgentTest.TestScenarios.ProxyAgentExtension
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ vmImageVersion: latest
scenarios:
- className: GuestProxyAgentTest.TestScenarios.BVTScenario
name: BVTScenario
- name: BugFixesScenario
className: GuestProxyAgentTest.TestScenarios.BugFixesScenario
- name: TCPPortScalabilityScenario
className: GuestProxyAgentTest.TestScenarios.TCPPortScalabilityScenario
- name: ProxyAgentExtension
className: GuestProxyAgentTest.TestScenarios.ProxyAgentExtension
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ vmImageVersion: latest
scenarios:
- className: GuestProxyAgentTest.TestScenarios.BVTScenario
name: BVTScenario
- name: BugFixesScenario
className: GuestProxyAgentTest.TestScenarios.BugFixesScenario
- name: TCPPortScalabilityScenario
className: GuestProxyAgentTest.TestScenarios.TCPPortScalabilityScenario
- name: ProxyAgentExtension
className: GuestProxyAgentTest.TestScenarios.ProxyAgentExtension
16 changes: 0 additions & 16 deletions e2etest/GuestProxyAgentTest/TestScenarios/BugFixesScenario.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ public class ProxyAgentExtension : TestScenarioBase
{
public override void TestScenarioSetup()
{
string zipFile = Settings.TestSetting.Instance.zipFilePath;
string withoutExt = Path.GetFileNameWithoutExtension(zipFile);
string extractPath = Path.Combine(Path.GetDirectoryName(zipFile), withoutExt);
// Passing in 0 version number for the first validation case
string proxyAgentVersionBeforeUpdate = "0";
string proxyAgentVersion = Settings.TestSetting.Instance.proxyAgentVersion;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation
// SPDX-License-Identifier: MIT
using GuestProxyAgentTest.TestCases;
using GuestProxyAgentTest.Utilities;

namespace GuestProxyAgentTest.TestScenarios
{
public class TCPPortScalabilityScenario : TestScenarioBase
{
public override void TestScenarioSetup()
{
if (!Constants.IS_WINDOWS())
{
throw new InvalidOperationException("TCPPortScalability Scenario can only run on Windows VMs.");
}

string proxyAgentVersion = Settings.TestSetting.Instance.proxyAgentVersion;
ConsoleLog(string.Format("Received ProxyAgent Version:{0}", proxyAgentVersion));

// This scenario must enable MSP for the new VM to test TCP port scalability.
EnableProxyAgentForNewVM = true;

AddTestCase(new InstallOrUpdateGuestProxyAgentExtensionCase());
AddTestCase(new GuestProxyAgentExtensionValidationCase("GuestProxyAgentExtensionValidationCaseAfterUpdate", proxyAgentVersion));
AddTestCase(new TCPPortScalabilityCase());
// reboot the VM to let the TCP port scalability take effect.
AddTestCase(new RebootVMCase("RebootVMCaseAfterConfigTCPPortScalability"));
AddTestCase(new IMDSPingTestCase("IMDSPingTestForPortScalability", true));
}
}
}
Loading