4 ms·
I knew to look for this: "because I’m using SQLite in my test environment too" WHY DOES YOUR TEST ENVIRONMENT NOT MIMIC YOUR LIVE ENVIRONMENT? Seriously, tha
by wccrawford 15y ago
I knew to look for this:
"because I’m using SQLite in my test environment too"
WHY DOES YOUR TEST ENVIRONMENT NOT MIMIC YOUR LIVE ENVIRONMENT?
Seriously, that's really stupid. It's not a test environment, it's a playground. Fix that, or continue to have stupid issues like this plague you forever.
- nfm 15y agoThat's the point of my post. There are subtle differences between SQLite and MySQL/Postgres. You should use the same database in dev, test and production.
- Vitaly 15y agoIt is important to 'regularly' execute tests in an environment similar to production. But... Having your test suite run as fast as possible is also a big priority in development. even with autotest/guard and spork tests might be quite slow if they hit the db (I'm prefer them to indeed hit the db and not to mock every possible db call). So one solution can be to - use mysql in dev & production mode - use sqlite in test - run a CI server with mysql as the db this way you can run your tests fast, but still have them fail if there is a mysql/sqlite incompatibility somewhere
- wccrawford 15y agoNot his test suite, his test environment.