Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4c6565 committed Sep 20, 2022
1 parent 0ee12cf commit 274f472
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/service/loadbalancer/service_listener_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestGetListenerACLs(t *testing.T) {
connection: c,
}

c.EXPECT().Get("/loadbalancers/v2/acls?listener_id=123", gomock.Any()).Return(&connection.APIResponse{
c.EXPECT().Get("/loadbalancers/v2/listeners/123/acls", gomock.Any()).Return(&connection.APIResponse{
Response: &http.Response{
Body: ioutil.NopCloser(bytes.NewReader([]byte("{\"data\":[{\"id\":456}],\"meta\":{\"pagination\":{\"total_pages\":1}}}"))),
StatusCode: 200,
Expand Down Expand Up @@ -64,7 +64,7 @@ func TestGetListenerACLs(t *testing.T) {
connection: c,
}

c.EXPECT().Get("/loadbalancers/v2/acls?listener_id=123", gomock.Any()).Return(&connection.APIResponse{}, errors.New("test error 1"))
c.EXPECT().Get("/loadbalancers/v2/listeners/123/acls", gomock.Any()).Return(&connection.APIResponse{}, errors.New("test error 1"))

_, err := s.GetListenerACLs(123, connection.APIRequestParameters{})

Expand Down
4 changes: 2 additions & 2 deletions pkg/service/loadbalancer/service_targetgroup_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestGetTargetGroupACLs(t *testing.T) {
connection: c,
}

c.EXPECT().Get("/loadbalancers/v2/acls?target_group_id=123", gomock.Any()).Return(&connection.APIResponse{
c.EXPECT().Get("/loadbalancers/v2/target-groups/123/acls", gomock.Any()).Return(&connection.APIResponse{
Response: &http.Response{
Body: ioutil.NopCloser(bytes.NewReader([]byte("{\"data\":[{\"id\":456}],\"meta\":{\"pagination\":{\"total_pages\":1}}}"))),
StatusCode: 200,
Expand Down Expand Up @@ -64,7 +64,7 @@ func TestGetTargetGroupACLs(t *testing.T) {
connection: c,
}

c.EXPECT().Get("/loadbalancers/v2/acls?target_group_id=123", gomock.Any()).Return(&connection.APIResponse{}, errors.New("test error 1"))
c.EXPECT().Get("/loadbalancers/v2/target-groups/123/acls", gomock.Any()).Return(&connection.APIResponse{}, errors.New("test error 1"))

_, err := s.GetTargetGroupACLs(123, connection.APIRequestParameters{})

Expand Down

0 comments on commit 274f472

Please sign in to comment.