From c7165aca4852cbd8c05784419a9efffb28a0a92e Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 23 Jul 2024 12:05:02 -0700 Subject: [PATCH] Clean up fwtransport test missing error check (#11194) (#18816) [upstream:dc0429af5fff9ea131b3e8c4df7f2c73ea8d458a] Signed-off-by: Modular Magician --- .changelog/11194.txt | 3 +++ google/fwtransport/framework_config_test.go | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 .changelog/11194.txt diff --git a/.changelog/11194.txt b/.changelog/11194.txt new file mode 100644 index 00000000000..e05dbce6fcd --- /dev/null +++ b/.changelog/11194.txt @@ -0,0 +1,3 @@ +```release-note:none +none +``` \ No newline at end of file diff --git a/google/fwtransport/framework_config_test.go b/google/fwtransport/framework_config_test.go index 1dd83c6a713..c0ed0ff89c5 100644 --- a/google/fwtransport/framework_config_test.go +++ b/google/fwtransport/framework_config_test.go @@ -328,6 +328,9 @@ func TestFrameworkProvider_LoadAndValidateFramework_credentials(t *testing.T) { } t.Fatalf("did not expect error, but [%d] error(s) occurred", diags.ErrorsCount()) } + if tc.ExpectError && !diags.HasError() { + t.Fatalf("expected error, but no errors occurred") + } if !data.Credentials.Equal(tc.ExpectedDataModelValue) { t.Fatalf("want credentials to be `%s`, but got the value `%s`", tc.ExpectedDataModelValue, data.Credentials.String()) }