-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #13: > Pulp Smash's configuration file does not live with the source code itself. […] > There's one down-side to the current approach, though: it's hard to work with > multiple configuration files. Imagine that a user creates two virtualenvs, > installs Pulp Smash into each, and then wants to run Pulp Smash from both > locations. How can the user make the two Pulp Smash installations use a > different configuration file? Do this by making `ServerConfig` objects respect a new environment variable: `PULP_SMASH_CONFIG_FILE`. By default, `ServerConfig` objects look for a configuration file named "settings.json", but if the environment variable is set, a configuration file by that name is looked for instead. Add unit tests and documentation for the new functionality. Manual test results: $ mv ~/.config/pulp_smash/settings{,2}.json $ ls -A1 ~/.config/pulp_smash/ settings2.json $ python -m unittest2 discover pulp_smash.tests … (numerous ConfigFileNotFoundError exceptions) $ PULP_SMASH_CONFIG_FILE=settings2.json \ > python -m unittest2 discover pulp_smash.tests ....F... … ---------------------------------------------------------------------- Ran 8 tests in 3.968s FAILED (failures=1) The one test failure is expected.
- Loading branch information
1 parent
c7b2005
commit dcd77e2
Showing
3 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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