From 14c14e7452ab8dbcf5e05e55d2ea94d545c6bfa9 Mon Sep 17 00:00:00 2001 From: Derek Horton Date: Mon, 22 Jan 2024 13:40:36 -0600 Subject: [PATCH] Adjust tests --- internal/api/connectors/sources/impl.go | 4 +++- internal/api/connectors/sources/sources_test.go | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/api/connectors/sources/impl.go b/internal/api/connectors/sources/impl.go index f0ccf322..f1904d1f 100644 --- a/internal/api/connectors/sources/impl.go +++ b/internal/api/connectors/sources/impl.go @@ -77,7 +77,9 @@ func (this *sourcesClientImpl) getRHCConnectionStatus(ctx context.Context, sourc ID := ID(sourceId) - res, err := this.client.GetSourcesRhcConnectionWithResponse(ctx, ID, nil) + params := GetSourcesRhcConnectionParams{} + + res, err := this.client.GetSourcesRhcConnectionWithResponse(ctx, ID, ¶ms) if err != nil { return nil, err diff --git a/internal/api/connectors/sources/sources_test.go b/internal/api/connectors/sources/sources_test.go index e732756b..148b61e2 100644 --- a/internal/api/connectors/sources/sources_test.go +++ b/internal/api/connectors/sources/sources_test.go @@ -13,7 +13,7 @@ var _ = Describe("Sources", func() { It("interperates response correctly", func() { responses := []test.MockHttpResponse{ {StatusCode: 200, Body: `{"data": [{"id": "1", "name": "test", "availability_status": "connected"}]}`}, - {StatusCode: 200, Body: `{"id": "1", "rhc_id": "6f37c752ba1c48b1bcf74ef8f585d8ee", "availability_status": "connected"}`}, + {StatusCode: 200, Body: `{"data": [{"id": "1", "rhc_id": "6f37c752ba1c48b1bcf74ef8f585d8ee", "availability_status": "connected"}]}`}, } doer := test.MockMultiResponseHttpClient(responses...) @@ -37,7 +37,7 @@ var _ = Describe("Sources", func() { It("interperates response correctly if fields are missing", func() { responses := []test.MockHttpResponse{ {StatusCode: 200, Body: `{"data": [{"id": "1", "name": "test"}]}`}, - {StatusCode: 200, Body: `{"id": "1"}`}, + {StatusCode: 200, Body: `{"data": [{"id": "1"}]}`}, } doer := test.MockMultiResponseHttpClient(responses...)