From 60e864125a996c4dd23b5106195fe6e1d563d5d4 Mon Sep 17 00:00:00 2001 From: Austin Valle Date: Thu, 13 Jul 2023 14:01:50 -0400 Subject: [PATCH] helper/logging: Adjust unit test regex flag (#1224) * add flag * add timeout to lint --- .golangci.yml | 4 ++++ helper/logging/logging_http_transport_test.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 93392ee69f..4b020fab98 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -25,3 +25,7 @@ linters: - unparam - unused - vet + +run: + # Prevent false positive timeouts in CI + timeout: 5m \ No newline at end of file diff --git a/helper/logging/logging_http_transport_test.go b/helper/logging/logging_http_transport_test.go index d7c97a10b0..a7b84e110d 100644 --- a/helper/logging/logging_http_transport_test.go +++ b/helper/logging/logging_http_transport_test.go @@ -201,7 +201,7 @@ func TestNewSubsystemLoggingHTTPTransport(t *testing.T) { func TestNewLoggingHTTPTransport_LogMasking(t *testing.T) { ctx, loggerOutput := setupRootLogger() ctx = tflog.MaskFieldValuesWithFieldKeys(ctx, "tf_http_op_type") - ctx = tflog.MaskAllFieldValuesRegexes(ctx, regexp.MustCompile(`.*`)) + ctx = tflog.MaskAllFieldValuesRegexes(ctx, regexp.MustCompile(`(?s).*`)) ctx = tflog.MaskMessageStrings(ctx, "Request", "Response") transport := logging.NewLoggingHTTPTransport(http.DefaultTransport)