"testing"
ch "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/charts"
+ "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/deploy"
"gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/health"
"gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/models"
"gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/onboard"
"gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/restapi/operations/charts"
+ d "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/restapi/operations/deploy"
h "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/restapi/operations/health"
"gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/ricdms"
"github.com/stretchr/testify/assert"
HealthChecker: HealthCheckerMock{},
Onboarder: onboard.NewOnboarder(),
ChartMgr: ch.NewChartmgr(),
+ DeployMgr: deploy.NewDeploymentManager(),
}
code := m.Run()
os.Exit(code)
assert.IsType(t, &charts.GetChartsFetcherOK{}, resp, "response did not match type")
}
+func TestDownloadAndInstall(t *testing.T) {
+ response := rh.DownloadAndInstallChart("sample app", "1.0.0", "test")
+ if _, ok := response.(*d.PostDeployInternalServerError); !ok {
+ assert.Fail(t, "response type did not match (actual) %T", response)
+ }
+
+}
+
type HealthCheckerMock struct {
mock.Mock
}