@@ -68,7 +68,7 @@ generate: generate-testdata ## Update/generate all mock data. You should run thi
68
68
69
69
.PHONY : generate-testdata
70
70
generate-testdata : # # Update/generate the testdata in $GOPATH/src/sigs.k8s.io/kubebuilder
71
- ./generate_testdata .sh
71
+ ./test/testdata/generate .sh
72
72
73
73
.PHONY : lint
74
74
lint : golangci-lint # # Run golangci-lint linter
@@ -87,26 +87,35 @@ golangci-lint:
87
87
88
88
# #@ Tests
89
89
90
- .PHONY : go-test
91
- go-test : # # Run the unit test
92
- go test -race -v ./cmd/... ./pkg/... ./plugins/...
93
-
94
90
.PHONY : test
95
- test : # # Run the unit tests (used in the CI)
96
- ./test.sh
91
+ test : test-unit test-integration test-testdata # # Run the unit and integration tests (used in the CI)
92
+
93
+ .PHONY : test-unit
94
+ test-unit : # # Run the unit tests
95
+ go test -race -v ./pkg/...
97
96
98
97
.PHONY : test-coverage
99
- test-coverage : # # Run coveralls
100
- # remove all coverage files if exists
101
- - rm -rf * .out
102
- # run the go tests and gen the file coverage-all used to do the integration with coverrals.io
98
+ test-coverage : # # Run unit tests creating the output to report coverage
99
+ - rm -rf * .out # Remove all coverage files if exists
103
100
go test -race -failfast -tags=integration -coverprofile=coverage-all.out ./cmd/... ./pkg/... ./plugins/...
104
101
105
- .PHONY : test-e2e-local
106
- test-e2e-local : # # It will run the script to install kind and run e2e tests
107
- # # To keep the same kind cluster between test runs, use `SKIP_KIND_CLEANUP=1 make test-e2e-local`
108
- ./test_e2e_local.sh
102
+ .PHONY : test-integration
103
+ test-integration : # # Run the integration tests
104
+ ./test/integration.sh
109
105
110
106
.PHONY : check-testdata
111
107
check-testdata : # # Run the script to ensure that the testdata is updated
112
- ./check_testdata.sh
108
+ ./test/testdata/check.sh
109
+
110
+ .PHONY : test-testdata
111
+ test-testdata : # # Run the tests of the testdata directory
112
+ ./test/testdata/test.sh
113
+
114
+ .PHONY : test-e2e-local
115
+ test-e2e-local : # # Run the end-to-end tests locally
116
+ # # To keep the same kind cluster between test runs, use `SKIP_KIND_CLEANUP=1 make test-e2e-local`
117
+ ./test/e2e/local.sh
118
+
119
+ .PHONY : test-e2e-ci
120
+ test-e2e-ci : # # Run the end-to-end tests (used in the CI)`
121
+ ./test/e2e/ci.sh
0 commit comments