[gitlab] Improve test coverage#379
Open
sondrebr wants to merge 9 commits into
Open
Conversation
For some reason, `timeout` and `retry_transient_errors` were set manually after init instead of just being passed as arguments
Also change 'action' to get action from 'event_info' dict instead of '_object_attributes', to be consistent with 'event_type'
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 PR focuses on improving test coverage for the stuff added in the previous GitLab PRs (#370 and #376). It contains:
connections/gitlab.pytools/git.pytools/commands.py(SUPPORTED_COMMANDS_PER_GIT_HOSTandget_supported_commands())tools/event_info.pytest/events/)The sample event files are based on webhook events from GitHub and GitLab, with some values changed.
I did however keep (I think) all the fields so they can also be used for reference and tests in the future, for example when adding new EventInfo properties.
Note that this PR does not include any tests for the PRComment classes.
Existing code in
tools/pr_comments.pywill probably have to be changed a lot when implementing GL support for the rest of the commands, so I think it's better to wait and see if the existing tests can be modified and reused for PRComment tests.Edit: Addresses issue #375