You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow specifying the database/knex client using DB_CLIENT env variable
Switch from a MySQL-specific .sql schema file to using knex migrations, and create npm run migrate-db script
Setup docker/docker-compose to easily startup up database instances for testing
Updated README to document how environment is setup
Tried best to mimic the Circle CI environment, although the official docker MySQL image does not allow setting an empty password (MYSQL_PASSWORD) for a custom user (MYSQL_USER), only for root (MYSQL_ALLOW_EMPTY_PASSWORD=yes). Circle CI uses the user: ubuntu with no password, and the configuration uses this as the default, which requires overriding the user (DB_USER=root) when performing some commands/scripts locally against the docker containers
Fixed some tests that expected MySQL backtick escaping or were not escaping reserved Postgres tables/keywords (ex. user)
Still need to determine how best to configure Circle CI to run both MySQL and Postgres. Currently the MySQL tests are ran as part of npm run cover. Also need to determine how best to handle npm run test (related to CI, but also for local development for users submitting PRs.
Would be nice to run against different versions of Node (0.10, 0.12, 4.x, 5.x) but not sure if it would be overkill to also run all the different databases against all major versions of node (take a while without parallelism).
I've got the "Free and Open Source" setting turned on for js-data-sql, which apparently means that it gets 3 additional containers for a total of 4. Perhaps with that the parallelism can be configured to run the tests against different databases, versions of Node.js, etc.
Activity
Setup (and fix) tests to run against Postgres as well as MySQL. Issue #…
techniq commentedon Jan 25, 2016
a10acf5 made the following changes:
DB_CLIENTenv variablenpm run migrate-dbscriptdocker/docker-composeto easily startup up database instances for testingMYSQL_PASSWORD) for a custom user (MYSQL_USER), only for root (MYSQL_ALLOW_EMPTY_PASSWORD=yes). Circle CI uses the user:ubuntuwith no password, and the configuration uses this as the default, which requires overriding the user (DB_USER=root) when performing some commands/scripts locally against the docker containersuser)techniq commentedon Jan 25, 2016
Still need to determine how best to configure Circle CI to run both MySQL and Postgres. Currently the MySQL tests are ran as part of
npm run cover. Also need to determine how best to handlenpm run test(related to CI, but also for local development for users submitting PRs.jmdobry commentedon Jan 25, 2016
I was thinking CircleCi supported setting up a test matrix like Travis, but my first skim of the docs didn't turn anything up
techniq commentedon Jan 25, 2016
Yeah, I didn't see anything either. Found this hack/workaround -
https://github.com/michaelcontento/circleci-matrix
On Mon, Jan 25, 2016, 1:58 AM Jason Dobry notifications@github.com wrote:
techniq commentedon Jan 25, 2016
Would be nice to run against different versions of Node (0.10, 0.12, 4.x, 5.x) but not sure if it would be overkill to also run all the different databases against all major versions of node (take a while without parallelism).
jmdobry commentedon Jan 25, 2016
I've got the "Free and Open Source" setting turned on for js-data-sql, which apparently means that it gets 3 additional containers for a total of 4. Perhaps with that the parallelism can be configured to run the tests against different databases, versions of Node.js, etc.
https://circleci.com/docs/parallel-manual-setup