- Enabled test cases to execute for build validation.
- Fixed test case.
Signed-off-by: subhash kumar singh <subh.singh@samsung.com>
Change-Id: I6b520a9500cb4dd9de5d1ca1c0feeb5d6850d1ee
RUN go build -a -installsuffix cgo -o /go/src/ws/cache/go/cmd/ric-dms cmd/ric-dms.go
# Run unit tests
-#RUN GO111MODULE=on GO_ENABLED=0 GOOS=linux go test -p 1 -cover ./pkg/resthooks/
+ENV RIC_DMS_CONFIG_FILE=/go/src/ws/config/config-test.yaml
+RUN go test -p 1 -cover ./pkg/resthooks/
RUN gofmt -l $(find cmd/ pkg/ -name '*.go' -not -name '*_test.go')
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) {