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
- Update PostgreSQL connection string to include password authentication:
postgresql://circleci:testpassword@localhost:5432/tentaclio-db
- Set POSTGRES_PASSWORD in postgres container environment
- Install postgresql-client in CI for database readiness checks
- Add wait-for-postgres step to ensure database is ready before running tests
The functional tests were timing out in CI because:
1. The connection string didn't include authentication credentials
2. Tests ran before PostgreSQL was fully initialized
With these changes, the functional tests run successfully in CI with proper
password authentication instead of relying on trust-based authentication.
2. (Optional) Start PostgreSQL for functional tests:
33
+
```bash
34
+
docker-compose up -d
35
+
```
36
+
37
+
### Running Tests
38
+
39
+
#### Option 1: Using Docker (Recommended)
40
+
41
+
This repository includes a Docker Compose configuration that makes it easy to run tests locally without needing to install and configure PostgreSQL manually.
42
+
43
+
**Start PostgreSQL:**
44
+
```bash
45
+
docker-compose up -d
46
+
```
47
+
48
+
This starts a PostgreSQL 15 container with:
49
+
- User: `tentaclio`
50
+
- Database: `tentaclio-db`
51
+
- Password: `testpassword`
52
+
- Port: `5432`
53
+
54
+
**Run the test suites:**
55
+
```bash
56
+
# Linting
57
+
make lint
58
+
59
+
# Unit tests (don't require database)
60
+
make unit
61
+
62
+
# Functional tests (require PostgreSQL)
63
+
TENTACLIO__CONN__POSTGRES_TEST=postgresql://tentaclio:testpassword@localhost:5432/tentaclio-db make functional
64
+
```
65
+
66
+
**Stop PostgreSQL:**
67
+
```bash
68
+
docker-compose down
69
+
```
70
+
71
+
#### Option 2: Using your own PostgreSQL installation
72
+
73
+
If you prefer to use your own PostgreSQL instance:
74
+
75
+
1. Ensure PostgreSQL is running and accessible
76
+
2. Create a database and user for testing
77
+
3. Set the connection string environment variable:
0 commit comments