File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -43,15 +43,27 @@ deps:
43
43
go mod download
44
44
@echo " Verifying dependencies..."
45
45
go mod verify
46
- @echo " ✓ Dependencies ready!"
46
+ @echo " ✓ Dependencies ready!" e
47
47
48
- # Run tests (needs sudo for E2E tests )
49
- .PHONY : test
50
- test :
51
- @echo " Running tests..."
48
+ # Run unit tests only (no sudo required )
49
+ .PHONY : unit- test
50
+ unit- test :
51
+ @echo " Running unit tests..."
52
52
@which go > /dev/null || (echo " Go not found in PATH" && exit 1)
53
- sudo $(shell which go) test -v -race ./...
54
- @echo " ✓ All tests passed!"
53
+ go test -v -race $$(go list ./... | grep -v e2e_tests )
54
+ @echo " ✓ Unit tests passed!"
55
+
56
+ # Run E2E tests (Linux only, needs sudo)
57
+ .PHONY : e2e-test
58
+ e2e-test :
59
+ @echo " Running E2E tests..."
60
+ @which go > /dev/null || (echo " Go not found in PATH" && exit 1)
61
+ @if [ " $$ (uname)" != " Linux" ]; then \
62
+ echo " E2E tests require Linux platform. Current platform: $$ (uname)" ; \
63
+ exit 1; \
64
+ fi
65
+ sudo $(shell which go) test -v -race ./e2e_tests
66
+ @echo " ✓ E2E tests passed!"
55
67
56
68
# Run tests with coverage (needs sudo for E2E tests)
57
69
.PHONY : test-coverage
You can’t perform that action at this time.
0 commit comments