fix failing unit test

pull/21930/head
NiniOak 2024-11-26 12:38:46 -08:00
parent c76765bc06
commit 01a6157b9f
2 changed files with 3 additions and 3 deletions

View File

@ -743,7 +743,7 @@ func requireHasHeadersSet(t *testing.T, a *TestAgent, path string, contentType s
"X-XSS-Protection header value incorrect") "X-XSS-Protection header value incorrect")
require.Equal(t, contentType, hdrs.Get("Content-Type"), require.Equal(t, contentType, hdrs.Get("Content-Type"),
"Reponse Content-Type header value incorrect") "Response Content-Type header value incorrect")
} }
func TestUIResponseHeaders(t *testing.T) { func TestUIResponseHeaders(t *testing.T) {

View File

@ -935,11 +935,11 @@ func TestAPI_Headers(t *testing.T) {
_, _, err = kv.Get("test-headers", nil) _, _, err = kv.Get("test-headers", nil)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, "", request.Header.Get("Content-Type")) require.Equal(t, "application/json", request.Header.Get("Content-Type"))
_, err = kv.Delete("test-headers", nil) _, err = kv.Delete("test-headers", nil)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, "", request.Header.Get("Content-Type")) require.Equal(t, "application/json", request.Header.Get("Content-Type"))
err = c.Snapshot().Restore(nil, strings.NewReader("foo")) err = c.Snapshot().Restore(nil, strings.NewReader("foo"))
require.Error(t, err) require.Error(t, err)