Skip to content

Commit 00fe82e

Browse files
committed
fix(management): Opaque secrets now manage tls.crt and tls.key rather than certificates and private_keys. Only a single cert and key are supported.
1 parent 1fa203c commit 00fe82e

File tree

5 files changed

+285
-420
lines changed

5 files changed

+285
-420
lines changed

TestConsole/Program.cs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Program
122122
private const string KubeConfigEnvVar = "TEST_KUBECONFIG";
123123
private const string KubeNamespaceEnvVar = "TEST_KUBE_NAMESPACE";
124124

125-
public static int tableWidth = 120;
125+
public static int tableWidth = 200;
126126

127127
private static readonly TestEnvironmentalVariable[] _envVariables;
128128

@@ -340,7 +340,7 @@ private async static Task Main(string[] args)
340340
Console.WriteLine("Select Management Type Add or Remove");
341341
testMgmtType = Console.ReadLine();
342342
}
343-
343+
344344
tests = GetTestConfig(testConfigPath, testMgmtType);
345345

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

419419
jobResult = mgmt.ProcessJob(jobConfig);
420-
if (jobResult.Result == OrchestratorJobStatusJobResult.Success ||
421-
(jobResult.Result == OrchestratorJobStatusJobResult.Failure && testCase.Fail))
420+
if(testCase.Fail && jobResult.Result == OrchestratorJobStatusJobResult.Success)
422421
{
423-
testOutputDict[testCase.TestName] = $"Success {jobResult.FailureMessage}";
424-
Console.ForegroundColor = ConsoleColor.Green;
422+
testOutputDict[testCase.TestName] = $"Failure - {jobResult.FailureMessage} This test case was expected to fail but succeeded.";
423+
Console.ForegroundColor = ConsoleColor.Red;
424+
hasFailure = true;
425425
}
426-
else
426+
else if(!testCase.Fail && jobResult.Result == OrchestratorJobStatusJobResult.Failure)
427427
{
428-
testOutputDict[testCase.TestName] = $"Failure - {jobResult.FailureMessage}";
428+
testOutputDict[testCase.TestName] = $"Failure - {jobResult.FailureMessage} This test case was expected to succeed but failed.";
429429
Console.ForegroundColor = ConsoleColor.Red;
430430
hasFailure = true;
431431
}
432+
else
433+
{
434+
testOutputDict[testCase.TestName] = $"Success {jobResult.FailureMessage}";
435+
Console.ForegroundColor = ConsoleColor.Green;
436+
}
432437
Console.WriteLine(
433438
$"Job Hist ID:{jobResult.JobHistoryId}\nStorePath:{jobConfig.CertificateStoreDetails.StorePath}\nStore Properties:\n{jobConfig.CertificateStoreDetails.Properties}\nMessage: {jobResult.FailureMessage}\nResult: {jobResult.Result}");
434439

0 commit comments

Comments
 (0)