Repository navigation
Run the integration suite in CI - #18
Merged
Merged
Conversation
The 79 tests in integration_test.py are the only ones that exercise a real server -- subprocess handling, CSV parsing, pg_stat_statements, bundle assembly -- and every one of them is skipUnless(CONFIGURED). CI never set the variable, so that whole path was only ever covered on a laptop. The job starts the committed docker-compose.postgres-test.yml rather than a services: container, because a service cannot override the image command and so could not preload pg_stat_statements; the suite would then have quietly exercised the profiler's degradation path. Compose interpolates from the process environment in preference to a .env file, so a job-level env replaces --env-file and writes no credential to disk. An opt-in suite fails open: an unset or misspelled variable skips all 79 tests and reports success. A guard step asserts integration_test.CONFIGURED before the suite runs, so a green job means the tests ran. Credentials are the synthetic values docs/TESTING.md already documents. The one deviation is the host: db.invalid is reserved by RFC 2606 precisely so it cannot resolve, and this one has to connect, so it uses loopback. TestCIWorkflow guards the properties above as text assertions, since the repository has no YAML parser and must not acquire one. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
integrationjob to.github/workflows/ci.yaml. The tests inintegration_test.pyare the only ones that exercise a real server, and every one isskipUnless(CONFIGURED)— CI never set the variable, so that whole path was only ever covered on a laptop.docker-compose.postgres-test.ymlrather than aservices:container: a service cannot override the image command, so it could not preloadpg_stat_statements, and the suite would have quietly exercised the profiler's degradation path instead. Compose interpolates from the process environment in preference to a.envfile, so a job-levelenv:replaces--env-fileand writes no credential to disk.integration_test.CONFIGUREDbefore the suite runs, so a green job means the tests actually ran rather than that they were configured out.TestCIWorkflowguards those properties as text assertions — the repository has no YAML parser and must not acquire one.Credentials are the synthetic values
docs/TESTING.mdalready documents. One deviation: the documented hostdb.invalidis reserved by RFC 2606 precisely so it cannot resolve, and this job has to connect, so it uses loopback.Runs on Python 3.9 — the floor
release.yamlgates on. The existing matrix already covers the offline path on everything newer.Test plan
python3 dbprofiler.py --check-safetypython3 -m unittest— 403 tests, OKruff checkif: always(), bumping the Compose image without the client check, moving the URL onto a command line, unpinning an action, and introducing asecrets.reference are each caught by the test named for themintegrationjob passes here — it could not be run locally (nopsql/pg_dumpon the author's machine), so this PR was its first real executionRan 71 tests ... OK, zero skipped, and the Compose container reportedHealthybefore the suite started. 71 is the count onmain; theschema_by_tablebranch adds 8 more