Skip to content

Commit ba6ae67

Browse files
committed
fix: correct test paths in CI, Makefile, and scripts after reorganization
1 parent 0737d0d commit ba6ae67

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
- name: Set up Go
116116
uses: actions/setup-go@v5
117117
with:
118-
go-version: '1.21'
118+
go-version-file: 'go.mod'
119119

120120
- name: Download dependencies
121121
run: go mod download
@@ -124,7 +124,7 @@ jobs:
124124
run: sleep 15
125125

126126
- name: Run Integration Tests
127-
run: go run -tags=integration test/integration_main.go
127+
run: go run -tags=integration test/integration/main.go
128128
env:
129129
PG_SOURCE_DSN: "postgres://testuser:testpass@localhost:5432/sourcedb?sslmode=disable"
130130
PG_TARGET_DSN: "postgres://testuser:testpass@localhost:5433/targetdb?sslmode=disable"

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ test-integration:
4141
echo "docker-compose not found. Skipping integration tests."; \
4242
exit 0; \
4343
fi
44-
./run_integration_tests.sh
44+
./scripts/run_integration_tests.sh
4545

4646
test-e2e:
4747
@echo "Running E2E tests..."
48-
go run -tags=e2e test/e2e_test.go
48+
go run -tags=e2e test/e2e/main.go
4949

5050
test-coverage:
5151
go test -race -coverprofile=coverage.out ./...

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ go test ./...
144144

145145
# Integration tests (requires Docker)
146146
docker compose -f docker-compose.test.yml up -d
147-
go run -tags=integration test/integration_main.go
147+
go run -tags=integration test/integration/main.go
148148
docker compose -f docker-compose.test.yml down
149149
```
150150

scripts/run_integration_tests.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@ fi
1717

1818
# Start containers
1919
echo "Starting test databases..."
20-
docker-compose -f docker-compose.test.yml up -d
20+
# Ensure we are in project root for docker-compose file
21+
docker-compose --project-directory . -f docker-compose.test.yml up -d
2122

2223
# Wait for databases to be ready
2324
echo "Waiting for PostgreSQL and MySQL to be ready..."
2425
sleep 20 # MySQL takes longer to boot up
2526

26-
# Run integration tests locally (assuming go is installed properly)
27+
# Run integration tests locally
2728
echo "Running integration tests..."
28-
go test -tags=integration ./test/... -v
29+
go run -tags=integration test/integration/main.go
2930

3031
# Stop containers
3132
echo "Stopping test databases..."
32-
docker-compose -f docker-compose.test.yml down
33+
docker-compose --project-directory . -f docker-compose.test.yml down
3334

3435
echo "=== Integration tests complete ==="

0 commit comments

Comments
 (0)