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
21 changes: 13 additions & 8 deletions TestConsole/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Program
private const string KubeConfigEnvVar = "TEST_KUBECONFIG";
private const string KubeNamespaceEnvVar = "TEST_KUBE_NAMESPACE";

public static int tableWidth = 120;
public static int tableWidth = 200;

private static readonly TestEnvironmentalVariable[] _envVariables;

Expand Down Expand Up @@ -340,7 +340,7 @@ private async static Task Main(string[] args)
Console.WriteLine("Select Management Type Add or Remove");
testMgmtType = Console.ReadLine();
}

tests = GetTestConfig(testConfigPath, testMgmtType);

Console.WriteLine("Running Management Job Test Cases");
Expand Down Expand Up @@ -417,18 +417,23 @@ private async static Task Main(string[] args)
);

jobResult = mgmt.ProcessJob(jobConfig);
if (jobResult.Result == OrchestratorJobStatusJobResult.Success ||
(jobResult.Result == OrchestratorJobStatusJobResult.Failure && testCase.Fail))
if(testCase.Fail && jobResult.Result == OrchestratorJobStatusJobResult.Success)
{
testOutputDict[testCase.TestName] = $"Success {jobResult.FailureMessage}";
Console.ForegroundColor = ConsoleColor.Green;
testOutputDict[testCase.TestName] = $"Failure - {jobResult.FailureMessage} This test case was expected to fail but succeeded.";
Console.ForegroundColor = ConsoleColor.Red;
hasFailure = true;
}
else
else if(!testCase.Fail && jobResult.Result == OrchestratorJobStatusJobResult.Failure)
{
testOutputDict[testCase.TestName] = $"Failure - {jobResult.FailureMessage}";
testOutputDict[testCase.TestName] = $"Failure - {jobResult.FailureMessage} This test case was expected to succeed but failed.";
Console.ForegroundColor = ConsoleColor.Red;
hasFailure = true;
}
else
{
testOutputDict[testCase.TestName] = $"Success {jobResult.FailureMessage}";
Console.ForegroundColor = ConsoleColor.Green;
}
Console.WriteLine(
$"Job Hist ID:{jobResult.JobHistoryId}\nStorePath:{jobConfig.CertificateStoreDetails.StorePath}\nStore Properties:\n{jobConfig.CertificateStoreDetails.Properties}\nMessage: {jobResult.FailureMessage}\nResult: {jobResult.Result}");

Expand Down
Loading