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

Db test refactoring #1985

Merged
merged 15 commits into from
Jun 11, 2015
Merged

Conversation

Naktibalda
Copy link
Member

I refactored SqliteTest and PostgresTest to be more in line with MysqlTest:
Moved initial setup to setUpBeforeClass,
load to setUp,
cleanup to tearDown.

@DavertMik
Copy link
Member

Thanks, looks good. Waiting to get everything green there )

@samdark
Copy link
Collaborator

samdark commented May 28, 2015

Seems that it broke things...

@Naktibalda
Copy link
Member Author

It works for me! At least the DbTest.

@DavertMik
Copy link
Member

Looks like an issue with loading dump before the test. To be honest most of Db tests do not work for me, as I don't setup PostgreSQL or MySQL locally, instead I rely on Travis )

Please do not hurry, but could you find what goes wrong there?

@DavertMik DavertMik added the Db label May 28, 2015
@Naktibalda
Copy link
Member Author

I will create a separate branch for debugging which will run DbTest only

@Naktibalda
Copy link
Member Author

DbTest was green when executed in isolation: https://travis-ci.org/Codeception/Codeception/builds/64602009

@Naktibalda
Copy link
Member Author

I reproduced this test locally by running SqliteTest and DbTest in a group.

[Groups] debug

Unit Tests (654) ---------------------------------------------------------------------------------------------------------------------------
SqliteTest::testCleanupDatabase Ok
SqliteTest::testLoadDump Ok
DbTest::testSeeInDatabase Error
DbTest::testDontSeeInDatabase Error
DbTest::testDontSeeInDatabaseWithEmptyTable Error
DbTest::testGrabFromDatabase Error
DbTest::testHaveAndSeeInDatabase Error

@Naktibalda
Copy link
Member Author

I solved the issue by changing dsn in DbTest to avoid conflicts with SqliteTest.

@Naktibalda
Copy link
Member Author

Adding this line fixed appveyor. Why does it work for other branches?

  • echo extension=php_pdo_sqlite.dll >> php.ini

@Naktibalda
Copy link
Member Author

Appveyor holds a grudge against me.

Start-Service : Failed to start service 'postgresql-x64-9.3 (postgresql-x64-9.3)'.

Naktibalda added a commit that referenced this pull request Jun 11, 2015
@Naktibalda Naktibalda merged commit d9078af into Codeception:2.0 Jun 11, 2015
@Naktibalda Naktibalda deleted the db-test-refactoring branch June 11, 2015 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants