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
Allow to override everything using environment variables #5
Conversation
core/nightwatch.conf.js
Outdated
@@ -1,13 +1,13 @@ | |||
const settings = require('./nightwatch.settings.json'); | |||
const env = require('./core/tests/Drupal/Nightwatch/env'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured it out. This is already in the core dir, so ./core is redundant
core/tests/Drupal/Nightwatch/env.js
Outdated
|
||
const env = {}; | ||
|
||
if (!fs.fileExistsSync('../../../nightwatch.settings.json')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fs.existsSync('nightwatch.settings.json') -> process.cwd() says its in /var/www/html/core already, and is not relative to the directory that env.js exists in.
core/tests/Drupal/Nightwatch/env.js
Outdated
} | ||
}); | ||
|
||
module.export = env; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be
module.exports = env;
the ./core directory was redundant
small typo
Okay, so it doesnt work with a sqlite url: DB_URL=sqlite://localhost/sites/default/files/db.sqlite |
Here's a functioning mysql report. https://dispatcher.drupalci.org/job/drupalci_test_containers/929/testReport/# Looks like the test passed and we've got nightwatch tests, yay! (see the console log) https://dispatcher.drupalci.org/job/drupalci_test_containers/929/console There are some tests that fail now, probably because they rampage through the filesystem and find new things that werent there before, like .travis.yml files inside of the node_modules folder. So we're probably going to want to configure node_modules and the node cache to exist outside of the docroot. |
Let's merge it and figure out where the sqlite bit doesn't work. |
I would need to do some more testing