Skip to content

Commit

Permalink
fix tests 1
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-goodisman committed Apr 4, 2024
1 parent 49833b5 commit 03b44b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions integration-tests/acceptance/denylist_http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func doRequest(method string, path string, body map[string]interface{}, t *testi
func TestDenyList(t *testing.T) {
// GET empty list of rules
data := doRequest("GET", "/denylist", map[string]interface{}{}, t, 200)
if !reflect.DeepEqual(data, []string{}) {
if !reflect.DeepEqual(data, []interface{}{}) {
t.Fatalf("Expected empty list from blank GET, but got %#v", data)
}
// PUT new rule
Expand All @@ -60,7 +60,7 @@ func TestDenyList(t *testing.T) {
}
// GET list with new rule in it
data = doRequest("GET", "/denylist", map[string]interface{}{}, t, 200)
if !reflect.DeepEqual(data, []string{id}) {
if !reflect.DeepEqual(data, []interface{}{id}) {
t.Fatalf("Expected singleton from GET, but got %#v", data)
}
// GET existing rule
Expand All @@ -87,7 +87,7 @@ func TestDenyList(t *testing.T) {
}
// GET list with both rules
data = doRequest("GET", "/denylist", map[string]interface{}{}, t, 200)
if !reflect.DeepEqual(data, []string{id, id2}) {
if !reflect.DeepEqual(data, []interface{}{id, id2}) {
t.Fatalf("Expected doubleton from GET, but got %#v", data)
}
// DELETE first rule
Expand All @@ -96,7 +96,7 @@ func TestDenyList(t *testing.T) {
doRequest("GET", "/denylist/"+id, map[string]interface{}{}, t, 404)
// GET list with only second rule
data = doRequest("GET", "/denylist", map[string]interface{}{}, t, 200)
if !reflect.DeepEqual(data, []string{id2}) {
if !reflect.DeepEqual(data, []interface{}{id2}) {
t.Fatalf("Expected singleton from GET, but got %#V", data)
}
}

0 comments on commit 03b44b9

Please sign in to comment.