Skip to content

Commit 080bb68

Browse files
committed
tests: add check for invalid tests
Signed-off-by: Dorin Geman <[email protected]>
1 parent 5f42d70 commit 080bb68

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ test:
6666
integration-tests:
6767
@echo "Running integration tests..."
6868
@echo "Note: This requires Docker to be running"
69+
@echo "Checking test naming conventions..."
70+
@INVALID_TESTS=$$(grep "^func Test" cmd/cli/commands/integration_test.go | grep -v "^func TestIntegration"); \
71+
if [ -n "$$INVALID_TESTS" ]; then \
72+
echo "Error: Found test functions that don't start with 'TestIntegration':"; \
73+
echo "$$INVALID_TESTS" | sed 's/func \([^(]*\).*/\1/'; \
74+
exit 1; \
75+
fi
6976
@BUILD_DMR=$(BUILD_DMR) go test -v -race -count=1 -run "^TestIntegration" -timeout=5m ./cmd/cli/commands
7077
@echo "Integration tests completed!"
7178

0 commit comments

Comments
 (0)