@@ -182,23 +182,104 @@ Tests triggered by `make` can be controlled via these environment variables:
182182 ```
183183
184184### How to update vcrpy tests
185- Some tests include HTTP call(s) to GD.CN instance. That tests are executed through
186- [vcrpy](https://vcrpy.readthedocs.io/) so that GD.CN instance is needed either first time or when request is changed.
185+ Some tests include HTTP call(s) to GoodData instance. Those tests are executed through
186+ [vcrpy](https://vcrpy.readthedocs.io/) so that a GoodData instance is needed either the first time or when a request is changed.
187187It has clear benefits:
188- - ability to run the tests without GD.CN
188+ - ability to run the tests without a GoodData instance
189189- request and response snapshot - it makes debugging of HTTP calls simple
190190
191- But there is one disadvantage. One needs GD.CN instance with the original setup to change tests.
192- `docker-compose.yaml` in root of the repository is here to help. It starts:
193- - GD.CN AIO in selected version
194- - postgres with gooddata-fdw extension
195- - service which setups GD.CN AIO demo project including PDM, LDM, metrics and visualizations
191+ But there is one disadvantage. One needs a GoodData instance with the original setup to change tests.
192+ `docker-compose.yaml` in the root of the repository is here to help.
193+
194+ #### Prerequisites for Running Tests Locally
195+
196+ 1. **AWS ECR Login** - The docker-compose uses ECR images:
197+ ```bash
198+ aws ecr get-login-password | docker login --username AWS --password-stdin 020413372491.dkr.ecr.us-east-1.amazonaws.com
199+ ```
200+
201+ 2. **GoodData License Key** - Get from the GoodData team and place it in the `./build/license` file:
202+ ```bash
203+ mkdir -p build
204+ echo "<your_license_key>" > build/license
205+ ```
206+ The auth-service reads the license from this mounted location.
207+
208+ #### What docker-compose starts
209+
210+ The docker-compose starts a full GoodData microservices stack:
211+
212+ **Infrastructure services:**
213+ - PostgreSQL (with demo databases: `md`, `dex`, `automation`, `gw`, `tiger`)
214+ - Redis (caching)
215+ - Apache Pulsar (messaging)
216+ - Traefik (routing)
217+ - Dex (OIDC authentication)
218+
219+ **Core GoodData services:**
220+ - metadata-api, auth-service, calcique, sql-executor, result-cache
221+ - afm-exec-api, scan-model, api-gateway, api-gw
222+ - automation, export-controller, tabular-exporter
223+ - quiver (data processing engine)
224+
225+ **Bootstrap services (run once):**
226+ - `metadata-organization-bootstrap` - Creates organization + admin user
227+ - `data-loader` - Loads demo data into PostgreSQL (with `--no-schema-versioning`)
228+ - `create-ds` - Registers data sources in metadata-api
229+ - `layout-uploader` - Uploads workspace hierarchy, analytics model, users, permissions
230+
231+ #### The `--no-schema-versioning` Flag
232+
233+ The data-loader uses `--no-schema-versioning` flag to ensure:
234+ - Schema names are consistent (e.g., `demo` not `demo_abc123`)
235+ - Fixture names don' t have hash suffixes
236+ - VCR cassette tests produce reproducible results
237+
238+ # ### Starting GoodData for Tests
239+
240+ ` ` ` bash
241+ # Start all services
242+ docker compose up -d
243+
244+ # Wait for bootstrap to complete (watch for "Layout upload completed successfully!")
245+ docker compose logs -f metadata-organization-bootstrap data-loader create-ds layout-uploader
246+
247+ # Check service status
248+ docker compose ps
249+
250+ # The GoodData API is available at http://localhost:3000
251+ # Default credentials: demo@example.com / demo123
252+ # API token: YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz
253+ ` ` `
254+
255+ # ### Updating vcrpy Cassettes
196256
197257When a vcrpy supported test needs to be updated:
198- - start GD.CN using above `docker-compose.yaml`
199- - delete original vcrpy cassette with `make remove-cassettes`
200- - execute test
201- - update a newly generated cassette to the git
258+ - Start GoodData using the above ` docker-compose.yaml`
259+ - Wait for all bootstrap services to complete
260+ - Delete original vcrpy cassette with ` make remove-cassettes`
261+ - Execute test
262+ - Commit the newly generated cassette to git
263+
264+ # ### Stopping and Cleanup
265+
266+ ` ` ` bash
267+ # Stop all services
268+ docker compose down
269+
270+ # Full cleanup (remove volumes - required for fresh start)
271+ docker compose down -v
272+ ` ` `
273+
274+ # ### Running gooddata-fdw Tests
275+
276+ The FDW (Foreign Data Wrapper) tests require an additional service. Start it with:
277+
278+ ` ` ` bash
279+ docker compose --profile fdw up -d
280+ ` ` `
281+
282+ This starts a PostgreSQL instance with the gooddata-fdw extension on port 2543.
202283
203284# # Run continuous integration tests
204285Tests in pull request (PR) are executed using docker. The following is done to make test environment as close
@@ -229,7 +310,7 @@ venv automatically. So when docker tox tests are executed after localhost tests
229310 ` ` ` bash
230311 TEST_ENVS=py311,py310 ADD_ARGS=" -k http_headers" make test-ci
231312 ` ` `
232- - run tests on localhost against all-in-one image started with docker-compose
313+ - run tests on localhost against microservices started with docker-compose
233314 ` ` ` bash
234315 RECREATE_ENVS=1 HOST_NETWORK=1 make test-ci
235316 ` ` `
0 commit comments