diff --git a/Framework/ArgsUniform/ArgsUniform.cs b/Framework/ArgsUniform/ArgsUniform.cs index 1cb0792..db1a6b2 100644 --- a/Framework/ArgsUniform/ArgsUniform.cs +++ b/Framework/ArgsUniform/ArgsUniform.cs @@ -233,7 +233,8 @@ namespace ArgsUniform private static bool AssignBool(T result, PropertyInfo uniformProperty, object value) { - if (value != null) + var s = value.ToString(); + if (s == "1" || s.ToLowerInvariant() == "true") { uniformProperty.SetValue(result, true); } diff --git a/Tests/CodexContinuousTests/Configuration.cs b/Tests/CodexContinuousTests/Configuration.cs index bc34739..ba4d9aa 100644 --- a/Tests/CodexContinuousTests/Configuration.cs +++ b/Tests/CodexContinuousTests/Configuration.cs @@ -15,7 +15,7 @@ namespace ContinuousTests [Uniform("codex-deployment", "c", "CODEXDEPLOYMENT", true, "Path to codex-deployment JSON file.")] public string CodexDeploymentJson { get; set; } = string.Empty; - [Uniform("keep", "k", "KEEP", false, "Set to '1' to retain logs of successful tests.")] + [Uniform("keep", "k", "KEEP", false, "Set to 1 or 'true' to retain logs of successful tests.")] public bool KeepPassedTestLogs { get; set; } = false; [Uniform("kube-config", "kc", "KUBECONFIG", true, "Path to Kubeconfig file. Use 'null' (default) to use local cluster.")] @@ -30,7 +30,7 @@ namespace ContinuousTests [Uniform("filter", "f", "FILTER", false, "If set, runs only tests whose names contain any of the filter strings. Comma-separated. Case sensitive.")] public string Filter { get; set; } = string.Empty; - [Uniform("cleanup", "cl", "CLEANUP", false, "If set, the kubernetes namespace will be deleted after the test run has finished.")] + [Uniform("cleanup", "cl", "CLEANUP", false, "If set to 1 or 'true', the kubernetes namespace will be deleted after the test run has finished.")] public bool Cleanup { get; set; } = false; public CodexDeployment CodexDeployment { get; set; } = null!;