From df81493dddccf0c3cb2ef281e3d5d04a95c49aae Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Fri, 6 Dec 2024 19:31:57 +0100 Subject: [PATCH] fix test expectation --- management/server/http/policies_handler_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/management/server/http/policies_handler_test.go b/management/server/http/policies_handler_test.go index f8a897eb2..ad01f70d1 100644 --- a/management/server/http/policies_handler_test.go +++ b/management/server/http/policies_handler_test.go @@ -155,6 +155,7 @@ func TestPoliciesGetPolicy(t *testing.T) { func TestPoliciesWritePolicy(t *testing.T) { str := func(s string) *string { return &s } + emptyString := "" tt := []struct { name string expectedStatus int @@ -183,8 +184,9 @@ func TestPoliciesWritePolicy(t *testing.T) { expectedStatus: http.StatusOK, expectedBody: true, expectedPolicy: &api.Policy{ - Id: str("id-was-set"), - Name: "Default POSTed Policy", + Id: str("id-was-set"), + Name: "Default POSTed Policy", + Description: &emptyString, Rules: []api.PolicyRule{ { Id: str("id-was-set"), @@ -227,8 +229,9 @@ func TestPoliciesWritePolicy(t *testing.T) { expectedStatus: http.StatusOK, expectedBody: true, expectedPolicy: &api.Policy{ - Id: str("id-existed"), - Name: "Default POSTed Policy", + Id: str("id-existed"), + Name: "Default POSTed Policy", + Description: &emptyString, Rules: []api.PolicyRule{ { Id: str("id-existed"),