-
-
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
Ensure git tag tests and others create test repos in tmpdir #18447
Ensure git tag tests and others create test repos in tmpdir #18447
Conversation
There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix go-gitea#18444 Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
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. IIRC, most assert.Xxx
return bool
if err != nil {
assert.NotNil(t, aTag)
return
}
could be written as:
if !assert.NotNil(t, aTag) {
return
}
There is a potential race in the drone integration tests whereby test-mysql etc will start writing to log files causing make test-check fail. Fix go-gitea#18077 Signed-off-by: Andrew Thornton <art27@cantab.net>
Codecov Report
@@ Coverage Diff @@
## main #18447 +/- ##
=======================================
Coverage 46.01% 46.02%
=======================================
Files 842 842
Lines 93192 93192
=======================================
+ Hits 42881 42887 +6
+ Misses 43508 43500 -8
- Partials 6803 6805 +2
Continue to review full report at Codecov.
|
…#18447) Backport go-gitea#18447 * Ensure git tag tests and other create test repos in tmpdir There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix go-gitea#18444 * Change log root for integration tests to use the REPO_TEST_DIR There is a potential race in the drone integration tests whereby test-mysql etc will start writing to log files causing make test-check fail. Fix go-gitea#18077 Signed-off-by: Andrew Thornton <art27@cantab.net>
…18767) Backport #18447 * Ensure git tag tests and other create test repos in tmpdir There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix #18444 * Change log root for integration tests to use the REPO_TEST_DIR There is a potential race in the drone integration tests whereby test-mysql etc will start writing to log files causing make test-check fail. Fix #18077 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
…#18447) * Ensure git tag tests and other create test repos in tmpdir There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix go-gitea#18444 * Change log root for integration tests to use the REPO_TEST_DIR There is a potential race in the drone integration tests whereby test-mysql etc will start writing to log files causing make test-check fail. Fix go-gitea#18077 Signed-off-by: Andrew Thornton <art27@cantab.net>
There are a few places where tests appear to reuse testing repos which
causes random CI failures.
This PR simply changes these tests to ensure that cloning always happens
into new temporary directories.
Also ensure that integration tests go to repo_test_dir too.
Fix #18444
Fix #18077
Signed-off-by: Andrew Thornton art27@cantab.net