Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying Kiali Client methods to use getRequestAndUnmarshalInto to avoid masking of errors returned by the server #7215

Merged
merged 9 commits into from Apr 1, 2024
6 changes: 4 additions & 2 deletions tests/integration/tests/namespaces_test.go
Expand Up @@ -41,7 +41,8 @@ func TestInvalidNamespaceHealth(t *testing.T) {
_, code, err := kiali.NamespaceWorkloadHealth("invalid", params)

// namespace not found instead of internal server error
require.Nil(err)
require.Error(err)
require.Contains(err.Error(), "namespaces \\\"invalid\\\" not found")
require.NotEqual(200, code)
}

Expand Down Expand Up @@ -70,7 +71,8 @@ func TestNamespaceHealthInvalidRate(t *testing.T) {
_, code, err := kiali.NamespaceAppHealth(kiali.BOOKINFO, params)

// 500 and error message which is not failing in unmarshalling
require.Nil(err)
require.Error(err)
require.Contains(err.Error(), "not a valid duration string: \\\"invalid\\\"")
require.NotEqual(200, code)
}

Expand Down