Skip to content

Better settings for unit tests #795

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 1 commit into from
Jan 30, 2017
Merged

Conversation

ethantkoenig
Copy link
Member

Update default values of setting.RepoRootPath, setting.AppDataPath to be subdirectories of /tmp/.

@appleboy
Copy link
Member

LGTM

@tboerger tboerger added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jan 30, 2017
@lunny lunny added this to the 1.1.0 milestone Jan 30, 2017
@lunny
Copy link
Member

lunny commented Jan 30, 2017

LGTM

@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 Jan 30, 2017
@lunny lunny merged commit 7765593 into go-gitea:master Jan 30, 2017
@@ -30,8 +30,8 @@ func TestMain(m *testing.M) {
setting.RunUser = "runuser"
setting.SSH.Port = 3000
setting.SSH.Domain = "try.gitea.io"
setting.RepoRootPath = "/repos"
setting.AppDataPath = "/appdata"
setting.RepoRootPath = "/tmp/repos"
Copy link
Contributor

@andreynering andreynering Jan 30, 2017

Choose a reason for hiding this comment

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

This certainty won't work on Windows. We should use os.TempDir instead.

filepath.Join(os.TempDir(), "repos")

Copy link
Member

Choose a reason for hiding this comment

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

@ethantkoenig could you send another PR to fix this so that we don't need to revert this one.

@ethantkoenig ethantkoenig deleted the fix/tests branch January 30, 2017 13:39
@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.

5 participants