You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: commitment change API integration test (#592)
- fix hypervisor crd Tilt reference
- make test with proper summary based on gotestsum
- Adding integration tests for commitment change API
- Commitment change API handles more corner cases
- commitment config added
- moving endpoint to "/v1/commitments/..."
Copy file name to clipboardExpand all lines: Makefile
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,17 @@ lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
28
28
test: ## Run all tests.
29
29
go test ./...
30
30
31
+
.PHONY: testsum
32
+
testsum: gotestsum ## Run all tests (clean output for passing, verbose for failing). Options: WATCH=1, RUN=<pattern>, PACKAGE=<pkg>, FORMAT=<fmt> (e.g., standard-verbose for all output)
33
+
$(GOTESTSUM)\
34
+
$(if$(WATCH),--watch)\
35
+
--format $(if$(FORMAT),$(FORMAT),testname)\
36
+
--hide-summary=all \
37
+
-- \
38
+
$(if$(VERBOSE),-v)\
39
+
$(if$(RUN),-run $(RUN))\
40
+
$(if$(PACKAGE),$(PACKAGE),./...)
41
+
31
42
.PHONY: generate
32
43
generate: deepcopy crds ## Regenerate CRDs and DeepCopy after API type changes.
33
44
@@ -45,9 +56,11 @@ $(LOCALBIN):
45
56
46
57
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
47
58
GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
59
+
GOTESTSUM = $(LOCALBIN)/gotestsum
48
60
49
61
CONTROLLER_TOOLS_VERSION ?= v0.20.0
50
62
GOLANGCI_LINT_VERSION ?= v2.9.0
63
+
GOTESTSUM_VERSION ?= v1.13.0
51
64
52
65
.PHONY: controller-gen
53
66
controller-gen: $(CONTROLLER_GEN)## Download controller-gen locally if necessary.
Copy file name to clipboardExpand all lines: docs/develop.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,21 @@ Cortex is developed using the Go programming language. To get started with the d
34
34
35
35
Run `make` in your terminal from the cortex root directory to perform linting and testing tasks.
36
36
37
+
### Working on Tests
38
+
39
+
```bash
40
+
# Watch mode for continuous testing; print logs for failed tests only
41
+
make testsum WATCH=1
42
+
```
43
+
44
+
The `testsum` target provides cleaner output by showing only full verbose output for failing tests.
45
+
46
+
**Available options:**
47
+
-`WATCH=1` - Automatically re-run tests when files change
48
+
-`RUN=<pattern>` - Run specific tests matching the pattern
49
+
-`PACKAGE=<pkg>` - Test specific package(s)
50
+
-`FORMAT=<fmt>` - Change output format (e.g., `standard-verbose` for verbose output on all tests)
51
+
37
52
## Helm Charts
38
53
39
54
Helm charts bundle the application into a package, containing all the [Kubernetes](https://kubernetes.io/docs/tutorials/hello-minikube/) resources needed to run the application. The configuration for the application is specified in the [Helm `values.yaml`](cortex.secrets.example.yaml).
0 commit comments