Skip to content

Commit 8422102

Browse files
Merge branch 'main' into users/ankitshar/diskspdOnBareDisk
2 parents 88c496b + c61a186 commit 8422102

71 files changed

Lines changed: 8728 additions & 1404 deletions

File tree

Some content is hidden

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

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.14
1+
3.0.17

src/VirtualClient/VirtualClient.Actions.FunctionalTests/AspNetBenchProfileTests.cs

Lines changed: 0 additions & 150 deletions
This file was deleted.

src/VirtualClient/VirtualClient.Actions.FunctionalTests/MLPerfProfileTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace VirtualClient.Actions
1616

1717
[TestFixture]
1818
[Category("Functional")]
19+
[Ignore("MLPerf profiles archived - no longer in active profiles directory")]
1920
public class MLPerfProfileTests
2021
{
2122
private DependencyFixture mockFixture;
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
namespace VirtualClient.Actions
5+
{
6+
using System;
7+
using System.Collections.Generic;
8+
using System.Linq;
9+
using System.Net;
10+
using System.Threading;
11+
using System.Threading.Tasks;
12+
using NUnit.Framework;
13+
using VirtualClient.Common;
14+
using VirtualClient.Contracts;
15+
16+
[TestFixture]
17+
[Category("Functional")]
18+
public class NginxWrkProfileTests
19+
{
20+
private DependencyFixture mockFixture;
21+
private string clientAgentId;
22+
private string serverAgentId;
23+
24+
[OneTimeSetUp]
25+
public void SetupFixture()
26+
{
27+
this.clientAgentId = $"{Environment.MachineName}-Client";
28+
this.serverAgentId = $"{Environment.MachineName}-Server";
29+
30+
ComponentTypeCache.Instance.LoadComponentTypes(TestDependencies.TestDirectory);
31+
}
32+
33+
[SetUp]
34+
public void Setup()
35+
{
36+
this.mockFixture = new DependencyFixture();
37+
}
38+
39+
[Test]
40+
[TestCase("PERF-WEB-NGINX-WRK.json")]
41+
[TestCase("PERF-WEB-NGINX-WRK2.json")]
42+
public void NginxWrkProfileParametersAreInlinedCorrectly(string profile)
43+
{
44+
this.mockFixture.Setup(PlatformID.Unix, agentId: this.clientAgentId).SetupLayout(
45+
new ClientInstance(this.clientAgentId, "1.2.3.5", ClientRole.Client),
46+
new ClientInstance(this.serverAgentId, "1.2.3.4", ClientRole.Server));
47+
48+
using (ProfileExecutor executor = TestDependencies.CreateProfileExecutor(profile, this.mockFixture.Dependencies))
49+
{
50+
WorkloadAssert.ParameterReferencesInlined(executor.Profile);
51+
}
52+
}
53+
54+
[Test]
55+
[TestCase("PERF-WEB-NGINX-WRK.json")]
56+
[TestCase("PERF-WEB-NGINX-WRK2.json")]
57+
public void NginxWrkProfileParametersAreAvailable(string profile)
58+
{
59+
this.mockFixture.Setup(PlatformID.Unix, agentId: this.clientAgentId).SetupLayout(
60+
new ClientInstance(this.clientAgentId, "1.2.3.5", ClientRole.Client),
61+
new ClientInstance(this.serverAgentId, "1.2.3.4", ClientRole.Server));
62+
63+
var serverPrams = new List<string> { "PackageName", "Role", "Timeout" };
64+
65+
var reverseProxyPrams = new List<string> { "PackageName", "Role", "Timeout" };
66+
67+
var clientPrams = new List<string> { "PackageName", "Role", "Timeout", "TestDuration", "FileSizeInKB", "Connection", "ThreadCount", "CommandArguments", "MetricScenario", "Scenario" };
68+
69+
using (ProfileExecutor executor = TestDependencies.CreateProfileExecutor(profile, this.mockFixture.Dependencies))
70+
{
71+
foreach (var actionBlock in executor.Profile.Actions)
72+
{
73+
string role = actionBlock.Parameters["Role"].ToString();
74+
75+
if (role.Equals("server", StringComparison.OrdinalIgnoreCase))
76+
{
77+
foreach (var pram in serverPrams)
78+
{
79+
if (!actionBlock.Parameters.ContainsKey(pram))
80+
{
81+
Assert.False(true, $"{actionBlock.Type} does not have {pram} parameter.");
82+
}
83+
}
84+
}
85+
else if (role.Equals("reverseproxy", StringComparison.OrdinalIgnoreCase))
86+
{
87+
foreach (var pram in reverseProxyPrams)
88+
{
89+
if (!actionBlock.Parameters.ContainsKey(pram))
90+
{
91+
Assert.False(true, $"{actionBlock.Type} does not have {pram} parameter.");
92+
}
93+
}
94+
}
95+
else
96+
{
97+
foreach (var pram in clientPrams)
98+
{
99+
if (!actionBlock.Parameters.ContainsKey(pram))
100+
{
101+
Assert.False(true, $"{actionBlock.Type} does not have {pram} parameter.");
102+
}
103+
}
104+
}
105+
}
106+
}
107+
}
108+
}
109+
}

src/VirtualClient/VirtualClient.Actions.FunctionalTests/SuperBenchmarkProfileTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void SuperBenchmarkWorkloadProfileParametersAreInlinedCorrectly(string pr
3939
}
4040

4141
[Test]
42-
[TestCase("SETUP-NVIDIA-A100.json")]
42+
[TestCase("SETUP-GPU-NVIDIA-A100.json")]
4343
public async Task SuperBenchmarkWorkloadProfileExecutesTheExpectedDependenciesAndReboot(string profile)
4444
{
4545
List<string> expectedCommands = new List<string>
@@ -74,7 +74,7 @@ public async Task SuperBenchmarkWorkloadProfileExecutesTheExpectedDependenciesAn
7474
}
7575

7676
[Test]
77-
[TestCase("SETUP-NVIDIA-A100.json")]
77+
[TestCase("SETUP-GPU-NVIDIA-A100.json")]
7878
public async Task SuperBenchmarkWorkloadProfileExecutesTheExpectedDependenciesAndWorkloadsAfterReboot(string profile)
7979
{
8080
IEnumerable<string> expectedCommands = this.GetProfileExpectedCommands(PlatformID.Unix);

0 commit comments

Comments
 (0)