Closed craddm closed 1 month ago
Click to see where and how coverage changed
File Statements Missing Coverage Coverage
(new stmts)Lines missing
data_safe_haven/commands
config.py
Project Total
This report was generated by python-coverage-comment-action
Looks like a test is trying to use az CLI. Maybe a missing mock fixture.
Looks like a test is trying to use az CLI. Maybe a missing mock fixture.
Yes - odd as it was working before we changed things today, and the only thing we changed which touches this test is how the yaml with the missing field is made.
Might be due to a change on develop that was merged in?
Might be due to a change on develop that was merged in?
Nope - just tested it out. It works fine if I revert the change in how sre_config_yaml_missing_field
is made. Can't understand why!
Hmm 🤔 something about how the sre_config_yaml
fixture is constructed?
Or, the change from missing value to missing field has changed what is happening underneath?
In any case, you should be able to follow the traceback (or code) to find out what is happening.
We just weren't doing it correctly, so the yaml
wasn't actually invalid and the upload
function was progressing to the point where it needed to be logged in. The validation errors happen before that point, so it isn't necessary to do extra mocks to cope with logins etc.
Oh, that is brilliant. We were too good at not writing bad YAML 😆.
:white_check_mark: Checklist
Enable foobar integration
rather than515 foobar
).develop
.:vertical_traffic_light: Depends on
:arrow_heading_up: Summary
Catches an exception when trying to upload an invalid config file and exits cleanly. Also improves the related error message to make it clearer what the validation error is.
Original error message:
Catches the error cleanly and yields a clearer error message
:closed_umbrella: Related issues
Closes #2210
:microscope: Tests
Tested locally