Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Upgrade knex dependency - test restructure #30

Closed
ErisDS opened this issue Oct 6, 2017 · 1 comment
Closed

Upgrade knex dependency - test restructure #30

ErisDS opened this issue Oct 6, 2017 · 1 comment

Comments

@ErisDS
Copy link
Member

ErisDS commented Oct 6, 2017

Knex is pinned to 0.8.6 and used inside of this repo purely for testing that the "knexify" adapter is able to convert from GQL to a query builder object and ultimately to the correct SQL.

The tests in this library rely on being able to do require('knex')({}), passing no config, and getting a fallback sql statement that reflects SQLite3, which used to be Ghost's default.

However, in later versions of knex, it is now required to pass in a client, e.g. require('knex')({client: 'sqlite3'}) or require('knex')({client: 'mysql'}).

This means that the tests fail after upgrading.

Using sqlite3 should make the tests work again, but that seems wrong as MySQL is now the default in Ghost. Therefore it seems like there needs to be some restructuring of the tests to make sure that we get the correct output for MySQL and SQLite3.

This is therefore a slightly bigger task than all the other dependency upgrades.

@kirrg001
Copy link
Contributor

GQL was replaced by NQL. GQL is deprecated now.

The knex handling is part of mongo-knex, which is used by NQL. The knex version is no longer pinned to 0.8.6. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants