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

remove sqlite tag when integration test with mysql/postgres and recreate database when init integration test #1693

Merged
merged 2 commits into from
May 9, 2017

Conversation

lunny
Copy link
Member

@lunny lunny commented May 8, 2017

As title. This will spend less time when run test-mysql and test-pgsql since there is no CGO build.

@lunny lunny added this to the 1.2.0 milestone May 8, 2017
if _, err = db.Exec("CREATE DATABASE testgitea"); err != nil {
log.Fatalf("db.Exec: %v", err)
if rows.Next() {
if _, err = db.Exec("DROP DATABASE testgitea"); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

What does this change do?

Copy link
Member Author

Choose a reason for hiding this comment

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

When run on drone it's no need. But when run make test-mysql local, it will failed when you run twice because the old data didn't cleanup. This change will drop the old database and load data from *.yml file.

@bkcsoft
Copy link
Member

bkcsoft commented May 8, 2017

Apart from the comment, LGTM

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 8, 2017
@bkcsoft
Copy link
Member

bkcsoft commented May 8, 2017

make LG-TM work

@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 May 8, 2017
@lafriks
Copy link
Member

lafriks commented May 8, 2017

Will it continue to work if user has no rights to drop database?

@bkcsoft
Copy link
Member

bkcsoft commented May 8, 2017

@lafriks No, but if they don't they probably don't have rights to create databases as well (previous test created the DB...)

@ethantkoenig
Copy link
Member

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 May 9, 2017
@bkcsoft bkcsoft merged commit d98a86d into go-gitea:master May 9, 2017
@lunny lunny deleted the lunny/improve_integration_test branch May 9, 2017 14:13
@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