X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fresthooks%2Fresthooks_test.go;h=7b65f15959426cf213324891bdb308ff2f60b4c0;hb=c39ef838fcfa6fd30e0c70a6f4a2abcc4a25643d;hp=39ff3f398cb8dbd5193f9e06b1cc09943438d108;hpb=f95c1d3a137db6a4dd4ff7d8c3a8f5a2a7a55c2f;p=ric-plt%2Fricdms.git diff --git a/pkg/resthooks/resthooks_test.go b/pkg/resthooks/resthooks_test.go index 39ff3f3..7b65f15 100644 --- a/pkg/resthooks/resthooks_test.go +++ b/pkg/resthooks/resthooks_test.go @@ -126,8 +126,9 @@ func TestGetCharts(t *testing.T) { resp := rh.GetCharts() assert.NotEqual(t, nil, resp) - successResp := resp.(*charts.GetChartsListOK) - assert.Equal(t, "SAMPLE_RESPONSE", successResp.Payload) + if _, ok := resp.(*charts.GetChartsListOK); !ok { + assert.Fail(t, "response type did not match : %t", resp) + } } func TestDownloadChart(t *testing.T) { @@ -212,6 +213,13 @@ func TestDownloadAndInstall(t *testing.T) { } +func TestUninstallxApp(t *testing.T) { + response := rh.UninstallChart("test", "test", "test") + if _, ok := response.(*d.DeleteDeployInternalServerError); !ok { + assert.Fail(t, "response type did not match actual: %T", response) + } +} + type HealthCheckerMock struct { mock.Mock }