Skip to content
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

Fix /api/repo/search integration tests #2550

Merged
merged 2 commits into from Sep 20, 2017

Conversation

Morlinest
Copy link
Member

Extracted fix from #2371. Fixes (and improves) #2446.

@codecov-io
Copy link

codecov-io commented Sep 19, 2017

Codecov Report

Merging #2550 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2550   +/-   ##
=======================================
  Coverage   26.99%   26.99%           
=======================================
  Files          85       85           
  Lines       17097    17097           
=======================================
  Hits         4615     4615           
  Misses      11807    11807           
  Partials      675      675

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a02978...ea1d7fc. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 19, 2017
@lunny lunny added this to the 1.3.0 milestone Sep 19, 2017
DecodeJSON(t, resp, &body)
for _, repo := range body.data {
assert.True(t, strings.Contains(repo.Name, keyword))
assert.NotEmpty(t, body.Data)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require.NotEmpty ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkcsoft I don't want to stop tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Morlinest Why? One failing test is enough to let whole integration tests fail. It will speed up testing a lot.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daviian If you are thinking about that like this, we should use require.* everywhere :). I want to see more than 1 step ahead. In my opinion, it's like parsing a form and showing just first error to user.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Morlinest in this particular test every following assertion will evaluate to false so there is no reason to check them anyway

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daviian Following assertions are inside range loop.

@ethantkoenig
Copy link
Member

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 20, 2017
@daviian
Copy link
Member

daviian commented Sep 20, 2017

LGTM

@lafriks
Copy link
Member

lafriks commented Sep 20, 2017

Make LG-TM work

@lunny
Copy link
Member

lunny commented Sep 20, 2017

Make L-G-T-M work again

@lafriks
Copy link
Member

lafriks commented Sep 20, 2017

Make L-GTM work :)

@tboerger tboerger 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 Sep 20, 2017
@lafriks lafriks merged commit 80b430d into go-gitea:master Sep 20, 2017
@Morlinest Morlinest deleted the fix/api-repo-integration-tests branch September 20, 2017 13:41
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 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. type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants