feat(core): Add --testing flag to cocod#281
Merged
Merged
Conversation
This is another bit of convenience for the reworked coco_runner test fixture. This adds an optional flag, `--testing`, to the cocod command-line which will be used by the coco_runner to put cocod into a test-isolation mode. When this flag is used: * cocod doesn't read any config from the standard config paths, but only from paths given by the COCO_CONFIG_FILE envar or on the command line. * cocod ignores a port specified in the config, and instead binds to a random port _on localhost only_. * So the runner knows which port it's listening on, cocod writes the port to a temporary state file called "_TESTING", which the runner can read the port from. * Cocod also inserts the random port it was assigned back into its own config so that a client fetching the config will get the correct port. The goal here is to ensure that, even were the cocod tests to be run on a host that happens to be running cocod in production, the test runner won't be able to interfere with or be affected by the production system.
tristpinsm
approved these changes
Jun 6, 2026
ketiltrout
added a commit
that referenced
this pull request
Jun 10, 2026
Otherwise the `self.config` that the worker receives doesn't have the updated port number. Follow-up to #281
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.
This is another bit of convenience for the reworked coco_runner test fixture.
This adds an optional flag,
--testing, to the cocod command-line which will be used by the coco_runner to put cocod into a test-isolation mode. When this flag is used:The goal here is to ensure that, even were the cocod tests to be run on a host that happens to be running cocod in production, the test runner won't be able to interfere with or be affected by the production system.