Skip to content

Make the PushCreate test declarative #11229

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

Merged
merged 7 commits into from
Apr 28, 2020

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Apr 27, 2020

Reduce the code duplication in the PushCreate test and switch
to a declarative format.

  • Instead of explicitly creating the repository re-use functions from the other declarative tests and add comments
  • Ensure that the test repository is deleted at the end of test
  • Slightly reorder the sub-tests

Also reduce the code duplication in MergeFork and add some comments there too and make doGitCloneFail be self-contained.

Signed-off-by: Andrew Thornton [email protected]

Reduce the code duplication in the PushCreate test and switch
to a declarative format.

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added type/testing skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Apr 27, 2020
@zeripath zeripath added this to the 1.12.0 milestone Apr 27, 2020
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 27, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 28, 2020
@zeripath zeripath merged commit 1f0b797 into go-gitea:master Apr 28, 2020
@zeripath zeripath deleted the declaratise-TestPushCreate branch April 28, 2020 08:32
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
Reduce the code duplication in the PushCreate test and switch
to a declarative format.

* Instead of explicitly creating the repository re-use functions from the other declarative tests and add comments
* Ensure that the test repository is deleted at the end of test
* Slightly reorder the sub-tests

Also reduce the code duplication in MergeFork and add some comments there too and make doGitCloneFail be self-contained.

Signed-off-by: Andrew Thornton [email protected]
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants