-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
improve testing for pgsql empty repository #22223
Conversation
I do not think this PR makes sense. Actually, it should already be clear about what happened:
My guess is that the test code of TestEmptyRepo is not stable.
The query If the returned repo & user have valid git repo on filesystem, then the test passes (most time). But, if something like user21's repo is returned, since it doesn't have any valid git repo on filesystem, the test fails. |
df80609
to
fe20ccc
Compare
Thanks! Done. |
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.
LGTM, while it may be easier to just use WHERE id=xxx
to query an empty repo explicitly.
While looking at the code I thought the same as @wxiaoguang , why not use a specific repo which meets the conditions? |
fe20ccc
to
ce613be
Compare
@KN4CK3R @wxiaoguang done. |
* upstream/main: Add Mermaid copy button, avoid unnecessary tooltip hide (go-gitea#22225) [skip ci] Updated licenses and gitignores Improve testing for pgsql empty repository (go-gitea#22223) JS refactors (go-gitea#22227) Check primary keys for all tables and drop ForeignReference (go-gitea#21721)
sometimes ci failure https://drone.gitea.io/go-gitea/gitea/64840/3/8
This PR is to know what happened.