Marco Ricci commited on 2024-10-15 13:16:27
Zeige 1 geänderte Dateien mit 5 Einfügungen und 1 Löschungen.
* t/vault-config-amending: Add changelog entry summarizing new warnings emitted Add changelog entry for the new amending/merging config import behavior Warn the user upon supplying an empty service name Add a stateful hypothesis test for config importing and merging Fix missing consideration of key and phrase both being specified Fix clean up of falsy "length" and "repeat" settings Correctly model vault global and service settings Move vault service config generation to top-level tests module Align behavior with vault concerning config imports GitHub: Closes #16.
... | ... |
@@@ -608,10 -732,13 +732,14 @@@ class TestCLI |
732 | 732 |
) as infile: |
733 | 733 |
config2 = json.load(infile) |
734 | 734 |
result = tests.ReadableResult.parse(_result) |
735 |
- assert result.clean_exit(empty_stderr=True), 'expected clean exit' |
|
735 |
+ assert result.clean_exit(empty_stderr=False), 'expected clean exit' |
|
736 | 736 |
assert config2 == config, 'config not imported correctly' |
737 |
+ assert not result.stderr or all( # pragma: no branch |
|
738 |
+ is_harmless_config_import_warning_line(line) |
|
739 |
+ for line in result.stderr.splitlines(True) |
|
740 |
+ ), 'unexpected error output' |
|
737 | 741 |
|
738 | 742 |
+ @tests.hypothesis_settings_coverage_compatible |
739 | 743 |
@hypothesis.given( |
740 | 744 |
conf=tests.smudged_vault_test_config( |
741 | 745 |
strategies.sampled_from(TEST_CONFIGS).filter( |
742 | 746 |