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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCT-3141 Add support for config repo GitHub release workflow #408
SCT-3141 Add support for config repo GitHub release workflow #408
Changes from 9 commits
f2c57bf
7c16195
3677f27
bd09a2b
2e8e22c
a760027
8008485
ecd708b
2a01b76
e104606
dc88404
d7b9299
84ccd4d
e94ed70
67212e3
8ff1285
254f5ce
26fbd93
9d39e02
3fc00de
a2babe8
bb50184
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There doesn't seem to be a test for this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is "this"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you mean the no-assets case. It's not currently replicable with GH, but the API spec doesnt specifically disallow an empty array here so, this is a "just in case" error that would require mocking GH reponses to test, which i think would be wild overkill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's practically impossible for this case to occur, I would just take code path out and add a comment that currently google will always have > 0 assets. If things change it'll throw a
TypeError
which I think is fineThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no tests for the new validation download
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be tricky as I'll need to mock the github api, but I can give it a go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually I want self-contained tests, but for this case my initial thought would be to just set up a github repo to test against. Mocking all that stuff seems like too much work for too little gain over just relying on an external resource. Is there a reason I'm not seeing that that's not doable or a bad idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... AND ANOTHER THING... mocking external dependencies is an anti-pattern anyway since if the external APIs change your tests will continue to pass but your actual deployments will fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a test for a few cases:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I have no privs for https://github.com/kbasetest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd ditch that check and add a comment mentioning that in that case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added tests for check_bool, no releases, no URL or repo_path, and repo_path but no repo_asset. Unfortunately still have no idea why coverage isnt running on this PR but I dont see it on many other PRs in the repo...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All I can say is that it ran on every PR I ever did from very early on, I think it was one of the first things I set up