Skip to content

Commit

Permalink
fix test expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Dec 6, 2024
1 parent c2fbe54 commit df81493
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions management/server/http/policies_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit df81493

Please sign in to comment.