-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile.integration.patch
More file actions
105 lines (93 loc) · 3.85 KB
/
Copy pathMakefile.integration.patch
File metadata and controls
105 lines (93 loc) · 3.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Comprehensive Integration Testing Section - Insert after line 154
# ============================================================================
# Comprehensive Integration Testing
# ============================================================================
# New comprehensive integration test suite
test-integration-comprehensive:
@echo "Running comprehensive integration test suite..."
@$(MAKE) test-integration-setup
@echo "Waiting for all services to be ready..."
@sleep 30
@echo "Running test suites..."
@cd tests/integration && $(MAKE) test
@$(MAKE) test-integration-teardown
# Individual test suites
test-integration-vm-lifecycle:
@echo "Running VM lifecycle integration tests..."
@cd tests/integration && DB_URL="$(DB_TEST_URL)" NOVACRON_API_URL="http://localhost:8090" \
go test -v -timeout 30m -run TestVMLifecycleTestSuite
test-integration-auth:
@echo "Running authentication integration tests..."
@cd tests/integration && DB_URL="$(DB_TEST_URL)" NOVACRON_API_URL="http://localhost:8090" \
go test -v -timeout 20m -run TestAuthTestSuite
test-integration-storage:
@echo "Running storage integration tests..."
@cd tests/integration && DB_URL="$(DB_TEST_URL)" NOVACRON_API_URL="http://localhost:8090" \
go test -v -timeout 25m -run TestStorageTestSuite
test-integration-consensus:
@echo "Running consensus integration tests..."
@cd tests/integration && DB_URL="$(DB_TEST_URL)" NOVACRON_API_URL="http://localhost:8090" \
go test -v -timeout 20m -run TestConsensusTestSuite
test-integration-performance:
@echo "Running performance integration tests..."
@cd tests/integration && DB_URL="$(DB_TEST_URL)" NOVACRON_API_URL="http://localhost:8090" \
go test -v -timeout 45m -run TestPerformanceTestSuite
test-integration-e2e:
@echo "Running end-to-end integration tests..."
@cd tests/integration && \
DB_URL="$(DB_TEST_URL)" \
NOVACRON_API_URL="http://localhost:8090" \
NOVACRON_WS_URL="ws://localhost:8091/ws" \
NOVACRON_UI_URL="http://localhost:8092" \
go test -v -timeout 60m -run TestE2ETestSuite
# Integration test with coverage
test-integration-coverage:
@echo "Running integration tests with coverage..."
@$(MAKE) test-integration-setup
@sleep 30
@cd tests/integration && \
DB_URL="$(DB_TEST_URL)" \
NOVACRON_API_URL="http://localhost:8090" \
go test -v -timeout 45m -coverprofile=integration-coverage.out ./...
@cd tests/integration && go tool cover -html=integration-coverage.out -o integration-coverage.html
@echo "Integration test coverage report: tests/integration/integration-coverage.html"
@$(MAKE) test-integration-teardown
# Integration test in Docker environment
test-integration-docker:
@echo "Running integration tests in Docker environment..."
@docker-compose -f docker-compose.test.yml up -d
@echo "Waiting for services to be ready..."
@sleep 45
@docker run --rm \
-v $(PWD):/app \
-w /app/tests/integration \
--network host \
-e DB_URL="postgresql://postgres:postgres@localhost:5433/novacron_test" \
-e REDIS_URL="redis://localhost:6380" \
-e NOVACRON_API_URL="http://localhost:8090" \
-e NOVACRON_WS_URL="ws://localhost:8091/ws" \
-e NOVACRON_UI_URL="http://localhost:8092" \
golang:1.21 \
make test
@docker-compose -f docker-compose.test.yml down
# Quick integration smoke tests
test-integration-smoke:
@echo "Running integration smoke tests..."
@$(MAKE) test-integration-setup
@sleep 20
@cd tests/integration && \
DB_URL="$(DB_TEST_URL)" \
NOVACRON_API_URL="http://localhost:8090" \
go test -v -timeout 10m -short ./...
@$(MAKE) test-integration-teardown
# Integration test debugging
test-integration-debug:
@echo "Running integration tests with debug output..."
@$(MAKE) test-integration-setup
@sleep 30
@cd tests/integration && \
DB_URL="$(DB_TEST_URL)" \
NOVACRON_API_URL="http://localhost:8090" \
DEBUG_MODE=true \
go test -v -timeout 30m ./... -args -debug
@$(MAKE) test-integration-teardown