Skip to content

Commit

Permalink
add cache tag for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zreigz committed Jul 22, 2024
1 parent 9e15dce commit 1efe1ec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ velero-crds:

.PHONY: test
test: envtest ## run tests
@KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(GOPATH)/bin -p path)" go test $$(go list ./... | grep -v /e2e) -v
@KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(GOPATH)/bin -p path)" go test $$(go list ./... | grep -v /e2e) -v -tags="cache"

.PHONY: lint
lint: $(PRE) ## run linters
Expand Down
2 changes: 2 additions & 0 deletions pkg/cache/cache_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cache

package cache

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/cache/resource_cache_entry_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cache

package cache

import (
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var kClient client.Client
var cfg *rest.Config
var err error

func TestControllers(t *testing.T) {
func TestE2ECache(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Resource Cache Suite")
}
Expand Down

0 comments on commit 1efe1ec

Please sign in to comment.