@@ -124,32 +124,43 @@ codegen-delete: ## delete generated files
124124.PHONY : --mocks
125125--mocks :
126126 @PATH=" ${PATH} :$( shell pwd) /build" go generate -x -v \
127- " github.com/pluralsh/kuberentes -agent/cmd/agentk/agentkapp" \
128- " github.com/pluralsh/kuberentes -agent/cmd/kas/kasapp" \
129- " github.com/pluralsh/kuberentes -agent/pkg/module/modagent" \
130- " github.com/pluralsh/kuberentes -agent/pkg/module/reverse_tunnel/tunnel" \
131- " github.com/pluralsh/kuberentes -agent/pkg/tool/redistool" \
132- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_agent_registrar" \
133- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_agent_tracker" \
134- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_cache" \
135- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_k8s" \
136- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_kubernetes_api" \
137- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_modagent" \
138- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_modserver" \
139- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_modshared" \
140- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_redis" \
141- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_reverse_tunnel_rpc" \
142- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_reverse_tunnel_tunnel" \
143- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_rpc" \
144- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_stdlib" \
145- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_tool" \
146- " github.com/pluralsh/kuberentes -agent/pkg/tool/testing/mock_usage_metrics"
127+ " github.com/pluralsh/kubernetes -agent/cmd/agentk/agentkapp" \
128+ " github.com/pluralsh/kubernetes -agent/cmd/kas/kasapp" \
129+ " github.com/pluralsh/kubernetes -agent/pkg/module/modagent" \
130+ " github.com/pluralsh/kubernetes -agent/pkg/module/reverse_tunnel/tunnel" \
131+ " github.com/pluralsh/kubernetes -agent/pkg/tool/redistool" \
132+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_agent_registrar" \
133+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_agent_tracker" \
134+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_cache" \
135+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_k8s" \
136+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_kubernetes_api" \
137+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_modagent" \
138+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_modserver" \
139+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_modshared" \
140+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_redis" \
141+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_reverse_tunnel_rpc" \
142+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_reverse_tunnel_tunnel" \
143+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_rpc" \
144+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_stdlib" \
145+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_tool" \
146+ " github.com/pluralsh/kubernetes -agent/pkg/tool/testing/mock_usage_metrics"
147147
148148# #@ Tests
149149
150150.PHONY : test
151- test : # # run tests
152- go test ./... -v
151+ test : tools # # run tests
152+ gotestsum --format pkgname -- ./... -v \
153+ -race -v -tags=" cache"
154+
155+ .PHONY : tools
156+ tools : # # install required tools
157+ tools : --tool
158+
159+ .PHONY : --tool
160+ % --tool : TOOL = .*
161+ --tool : # INTERNAL: installs tool with name provided via $(TOOL) variable or all tools.
162+ @cat tools.go | grep _ | awk -F' "' ' $$2 ~ /$(TOOL)/ {print $$2}' | xargs -I {} go install {}
163+
153164
154165.PHONY : lint
155166lint : --ensure-tools # # run linters
0 commit comments