ocopea/k8s-mongodsb

Tests fail to run

mrmccarthy opened this issue · 2 comments

#1 When trying to run the tests, I get the following:
$ go test
../../../../../src/ocopea/k8s-mongodsb/restapi/impl/copy_service_instance.go:10:2: cannot find package "ocopea/k8s-mongodsb/models" in any of:
/home/mmccarth/cndp/src/ocopea/k8s-mongodsb/vendor/ocopea/k8s-mongodsb/models (vendor tree)
/usr/local/go/src/ocopea/k8s-mongodsb/models (from $GOROOT)
/home/mmccarth/cndp/src/ocopea/k8s-mongodsb/models (from $GOPATH)
../../../../../src/ocopea/k8s-mongodsb/restapi/impl/copy_service_instance.go:12:2: cannot find package "ocopea/k8s-mongodsb/restapi/operations/dsb_web" in any of:
/home/mmccarth/cndp/src/ocopea/k8s-mongodsb/vendor/ocopea/k8s-mongodsb/restapi/operations/dsb_web (vendor tree)
/usr/local/go/src/ocopea/k8s-mongodsb/restapi/operations/dsb_web (from $GOROOT)
/home/mmccarth/cndp/src/ocopea/k8s-mongodsb/restapi/operations/dsb_web (from $GOPATH)

So I went to a path referenced by my GOPATH:
$ set | grep GO
GOPATH=/home/mmccarth/cndp
GOROOT=/usr/local/go

And retried and saw

$ cd /cndp/src/ocopea/k8s-mongodsb/restapi/impl/
mmccarth@ubuntu:
/cndp/src/ocopea/k8s-mongodsb/restapi/impl$ go test
copy_service_instance.go:10:2: cannot find package "ocopea/k8s-mongodsb/models" in any of:
/home/mmccarth/cndp/src/ocopea/k8s-mongodsb/vendor/ocopea/k8s-mongodsb/models (vendor tree)
/usr/local/go/src/ocopea/k8s-mongodsb/models (from $GOROOT)
/home/mmccarth/cndp/src/ocopea/k8s-mongodsb/models (from $GOPATH)
copy_service_instance.go:12:2: cannot find package "ocopea/k8s-mongodsb/restapi/operations/dsb_web" in any of:
/home/mmccarth/cndp/src/ocopea/k8s-mongodsb/vendor/ocopea/k8s-mongodsb/restapi/operations/dsb_web (vendor tree)
/usr/local/go/src/ocopea/k8s-mongodsb/restapi/operations/dsb_web (from $GOROOT)
/home/mmccarth/cndp/src/ocopea/k8s-mongodsb/restapi/operations/dsb_web (from $GOPATH)

This is based on a straight clone of this repo, without specifying a directory name for the repo.

Is there a restriction we need to document?

@mrmccarthy the issue is that you did not generate the code from swagger, so the code does not compile.. see the Dockerfile to get the correct swagger command to use.
I will add that to the README.md

I have committed a fix to the documentation