-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add tests for multi-repo setup #100
Open
yasunariw
wants to merge
13
commits into
master
Choose a base branch
from
yasu/add-multi-repo-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
yasunariw
force-pushed
the
yasu/support-multiple-repos
branch
from
December 29, 2020 01:57
64c4582
to
bdaa5e8
Compare
yasunariw
force-pushed
the
yasu/add-multi-repo-tests
branch
from
December 29, 2020 01:57
d983684
to
a3eea15
Compare
yasunariw
force-pushed
the
yasu/support-multiple-repos
branch
2 times, most recently
from
January 4, 2021 10:09
838ae7c
to
ababd1f
Compare
With repo-specific secrets, we'll need the repo name in order to obtain the webhook token used for signature validation. So parsing the request body for a GH payload needs to happen before, not after, the signature check.
Define custom getters for retrieving GH secret values. As the getter for each token type defaults to looking for a global value if a repo-specific vaue isn't found, existing deployments don't need to change.
For each test case, initializes a repo state from file if one exists.
Make secrets, config, state, and incoming payload configurable individually, so that it's easier to test multi-repo behavior.
yasunariw
force-pushed
the
yasu/support-multiple-repos
branch
from
January 5, 2021 06:11
6741fb6
to
d306035
Compare
yasunariw
force-pushed
the
yasu/add-multi-repo-tests
branch
from
January 5, 2021 06:11
a3eea15
to
3b7abea
Compare
`status.multi_repo_disallowed_repo` If `allowed_repositories` excludes the payload repo, it should be ignored even if payload would generate notification otherwise. `status.multi_repo_independent_status_state` The status rules should be evaluated for the correct repo. In this test case, it should correctly detect that `master`'s last build status was a failure for the given payload repo, and issue a success notification, despite the last build status success in a different repo.
yasunariw
force-pushed
the
yasu/add-multi-repo-tests
branch
from
January 5, 2021 06:27
3b7abea
to
1fa5f6e
Compare
yasunariw
force-pushed
the
yasu/add-multi-repo-tests
branch
from
November 30, 2021 06:29
1fa5f6e
to
34f4997
Compare
yasunariw
force-pushed
the
yasu/support-multiple-repos
branch
3 times, most recently
from
December 3, 2021 10:29
d3fe839
to
3e47dde
Compare
yasunariw
force-pushed
the
yasu/support-multiple-repos
branch
from
January 7, 2022 02:30
ec155eb
to
1792647
Compare
yasunariw
force-pushed
the
yasu/support-multiple-repos
branch
from
May 6, 2022 10:04
9697bed
to
233543c
Compare
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.
Description of the task
(depends on #97)
How to test
Existing tests should pass without regression. Three additional test cases confirm additional behavior related to this multi-repo setup. Namely:
allowed_repos
list excludes the payload repo, it should be ignored. (status.multi_repo_disallowed_repo
)master
's last build status was a failure for the given payload repo, and issue a success notification.(status.multi_repo_independent_status_state
)References