-
Notifications
You must be signed in to change notification settings - Fork 30
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
[WIP] fix: replace missing Oralce XE image #187
Conversation
1a7382d
to
e179de3
Compare
Replacement for Oracle XE image which was taken down
e179de3
to
98e17ce
Compare
@hacksparrow, the error seems to be related to null password:
|
Did you run |
7d2d395
to
19d83fb
Compare
package.json
Outdated
@@ -16,7 +16,8 @@ | |||
"scripts": { | |||
"lint": "eslint .", | |||
"lint:fix": "eslint . --fix", | |||
"test": "mocha --UV_THREADPOOL_SIZE=100 test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js", | |||
"pretest": "source ./setup.sh", |
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.
I'm not sure if we need to have the setup.sh
as the pretest, because it will imply that whoever running the tests need to use the oracle instance in docker.
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.
How do we setup Oracle for CI?
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.
@rmg, do you know?
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.
CI is using a static test Oracle instance and injecting the credentials for the tests to pick them up.
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.
Also, using source
here isn't portable. You should either run it directly (./setup.sh
) or via bash
(bash ./setup.sh
).
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.
@rmg apart from an Oracle instance, we have to populate some data in it. I got setup.sh
to do it's work (pulling the desired Oracle image, running it, and populating data), but ORACLE_USER
and ORACLE_PASSWORD
are not available to the app, despite export ORACLE_USER=SYSTEM ORACLE_PASSWORD=oracle && mocha --UV_THREADPOOL_SIZE=100 test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js
.
On the "Environment variables" page of the project on Jenkins, there's no entry for ORACLE_USER
and ORACLE_PASSWORD
, while it is there for Cloudant, DashDB, Redis etc.
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.
If the static instance already has the data populated, we will not need to run setup.sh
, just need ORACLE_USER
and ORACLE_PASSWORD
set in the "Environment variables" for the project.
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.
The credentials are already provided via rc
. The tests all have a line like this in them:
const config = require('rc')('loopback', {test: {oracle: {}}}).test.oracle;
That is pulling values from ~/.loopbackrc
, which is being injected in the test environment specifically to provide those credentials. The instance should already contain the test data as far as I'm aware. The purpose of setup.sh
was to create a local DB that matches that environment.
19d83fb
to
1118ce8
Compare
@rmg, I believe @hacksparrow mentioned we need the following two env variables set in order for the CI to pass: |
test/init/init.js
Outdated
@@ -10,6 +10,8 @@ let DataSource = juggler.DataSource; | |||
|
|||
const config = require('rc')('loopback', {test: {oracle: {}}}).test.oracle; | |||
config.maxConn = 64; | |||
config.user = process.env.ORACLE_USER; |
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.
This is throwing away the credentials provided by CI.
test/oracle.connectionpool.test.js
Outdated
@@ -16,6 +16,8 @@ let db, config; | |||
|
|||
before(function() { | |||
config = require('rc')('loopback', {dev: {oracle: {}}}).dev.oracle; | |||
config.user = process.env.ORACLE_USER; |
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.
This is throwing away the credentials provided by CI.
test/oracle.discover.test.js
Outdated
@@ -17,6 +17,8 @@ let db; | |||
describe('discoverModels', function() { | |||
before(function() { | |||
const config = require('rc')('loopback', {dev: {oracle: {}}}).dev.oracle; | |||
config.user = process.env.ORACLE_USER; |
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.
This is throwing away the credentials provided by CI.
6b798ae
to
e8e7186
Compare
Closing in favor of #189. |
Replacement for Oracle XE image which was taken down.
Related issues
Checklist
guide