Skip to content

Instantly share code, notes, and snippets.

@dengjonathan
Created September 12, 2025 21:39
Show Gist options
  • Save dengjonathan/6aafe1f9ec100983cad8fa94d11351db to your computer and use it in GitHub Desktop.
Save dengjonathan/6aafe1f9ec100983cad8fa94d11351db to your computer and use it in GitHub Desktop.
"When running Go integration tests in the Azimuth codebase, always set the required environment variables and use the correct command structure. There are two ways to run integration tests: 1) Use the provided script: `~/scripts/run_integration_test.sh <package_path> [test_suite] [test_method]` (e.g., `~/scripts/run_integration_test.sh ./web-service/model TestTestReportIntegrationTestSuite TestCreateTestReport`). 2) Manual command: `PG_HOST=localhost PG_PORT=5433 PG_USER=read_write_user PG_PASSWORD=temp_password PG_DB=azimuth go test -timeout 30s -tags integration,unit -run ^TestSuiteName$ ./path/to/package`. For specific test methods within a suite, add `-testify.m ^TestMethodName$`. Always run from the package directory or use the script. Never run integration tests without these environment variables as they will fail with database connection errors.
When running Go integration tests in the Azimuth codebase, always set the required environment variables and use the correct command structure. There are two ways to run integration tests: 1) Use the provided script: `~/personal-scripts/run_integration_test.sh <package_path> [test_suite] [test_method]` (e.g., `~/personal-scripts/run_integration_test.sh ./web-service/model TestTestReportIntegrationTestSuite TestCreateTestReport`). 2) Manual command: `PG_HOST=localhost PG_PORT=5433 PG_USER=read_write_user PG_PASSWORD=temp_password PG_DB=azimuth go test -timeout 30s -tags integration,unit -run ^TestSuiteName$ ./path/to/package`. For specific test methods within a suite, add `-testify.m ^TestMethodName$`. Always run from the package directory or use the script. Never run integration tests without these environment variables as they will fail with database connection errors.
The script should be run from the azimuth repository root directory (/Users/<username>/azimuth)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment