From: Taewan Kim Date: Mon, 4 Sep 2023 08:03:58 +0000 (+0900) Subject: Add the target for testing pkgs to Makefile X-Git-Tag: 1.0.0 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F11767%2F2;p=aiml-fw%2Faihp%2Fips%2Fkserve-adapter.git Add the target for testing pkgs to Makefile Issue-ID: AIMLFW-56 Change-Id: Id4d9c836b931db7fd29719fbe54604a8967bacfd Signed-off-by: Taewan Kim --- diff --git a/Makefile b/Makefile index 8557c94..70632b4 100644 --- a/Makefile +++ b/Makefile @@ -31,3 +31,12 @@ genmock: fmt: go fmt ./cmd/... go fmt ./pkg/... +test: + go mod tidy + mockgen -source=pkg/client/ricdms/client.go -destination=pkg/client/ricdms/mock/mock_client.go -package=mock + mockgen -source=pkg/api/v1/deployment/deployment.go -destination=pkg/api/v1/deployment/mock/mock_deployment.go -package=mock + mockgen -source=pkg/controller/v1/adapter/controller.go -destination=pkg/controller/v1/adapter/mock/mock_controller.go -package=mock + mockgen -source=pkg/client/kserve/client.go -destination=pkg/client/kserve/mock/mock_client.go -package=mock + + KUBECONFIG=~/.kube/config \ + go test ./pkg/...