From ce40415ae4ae94c501414c15c2d165a20d98a8d3 Mon Sep 17 00:00:00 2001 From: Anuj Chaudhari Date: Mon, 31 Jul 2023 10:33:37 -0700 Subject: [PATCH] Add additional unit test for expose log with TANZU_CLI_LOG_LEVEL (#85) --- log/logger_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/log/logger_test.go b/log/logger_test.go index dc31b791..c7be4327 100644 --- a/log/logger_test.go +++ b/log/logger_test.go @@ -28,7 +28,7 @@ func TestLogger(t *testing.T) { }, { test: "when TANZU_CLI_LOG_LEVEL is set to 3", - logLevel: "", + logLevel: "3", containStrings: []string{"log-default", "log-0", "log-1", "log-3"}, doesNotContainStrings: []string{"log-5", "log-8"}, }, @@ -38,6 +38,12 @@ func TestLogger(t *testing.T) { containStrings: []string{"log-default", "log-0", "log-1", "log-3", "log-5"}, doesNotContainStrings: []string{"log-8"}, }, + { + test: "when TANZU_CLI_LOG_LEVEL is set to 8", + logLevel: "8", + containStrings: []string{"log-default", "log-0", "log-1", "log-3", "log-5", "log-8"}, + doesNotContainStrings: []string{}, + }, { test: "when TANZU_CLI_LOG_LEVEL is set to 9", logLevel: "9",