-
Notifications
You must be signed in to change notification settings - Fork 77
Use the credentials of the microkernal as default value of the IBMs i… #682
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
Conversation
lib/fittings/rackhd_validator.js
Outdated
| } | ||
| } | ||
| var credentials = configuration.get("defaultIbms"); | ||
| if(credentials != undefined){ |
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.
Expected '!==' and instead saw '!='.
|
@RackHD/veyron |
geoff-reid
left a comment
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.
You should add a unit test for this change.
lib/fittings/rackhd_validator.js
Outdated
| } | ||
| var credentials = configuration.get("defaultIbms"); | ||
| var q1 = context.request.method | ||
| var q2 = context.request.originalUrl |
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.
Missing semicolon.
'q2' is defined but never used.
lib/fittings/rackhd_validator.js
Outdated
| } | ||
| } | ||
| var credentials = configuration.get("defaultIbms"); | ||
| var q1 = context.request.method |
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.
Missing semicolon.
'q1' is defined but never used.
spec/lib/api/2.0/ibms-spec.js
Outdated
| return helper.request().put('/api/2.0/ibms') | ||
| .send(defaultCred) | ||
| .expect('Content-Type', /^application\/json/) | ||
| .expect(400) |
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.
Missing semicolon.
spec/lib/api/2.0/ibms-spec.js
Outdated
| .send(defaultCred) | ||
| .expect('Content-Type', /^application\/json/) | ||
| .expect(201) | ||
| }) |
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.
Missing semicolon.
spec/lib/api/2.0/ibms-spec.js
Outdated
| return helper.request().put('/api/2.0/ibms') | ||
| .send(defaultCred) | ||
| .expect('Content-Type', /^application\/json/) | ||
| .expect(201) |
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.
Missing semicolon.
|
BUILD on-http #259 : FAILURE BUILD on-http #259 Error Logs ▼Test Name: Http.Api.Ibms /api/2.0/ibms should put an IBM instance with default credential Error Details: expected 201 "Created", got 400 "Bad Request" Response body: { message: 'ValidationError: Data does not match any schemas from "anyOf"', status: '400', UUID: '290df31e-a980-4c90-8747-631bcb70f407' } Error: expected 201 "Created", got 400 "Bad Request" at Test._assertStatus (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:247:11) at Test.assert (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:148:18) at assert (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:127:12) at /home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3) at IncomingMessage.<anonymous> (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:923:12) at nextTickCallbackWith2Args (node.js:458:9) at process._tickDomainCallback (node.js:413:17) Stack Trace: Error: expected 201 "Created", got 400 "Bad Request" at Test._assertStatus (node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (node_modules/supertest/lib/test.js:247:11) at Test.assert (node_modules/supertest/lib/test.js:148:18) at assert (node_modules/supertest/lib/test.js:127:12) at node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3) at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at endReadableNT (_stream_readable.js:923:12) |
|
BUILD on-http #260 : FAILURE BUILD on-http #260 Error Logs ▼Test Name: Http.Api.Ibms /api/2.0/ibms should PUT an IBM instance with default credential Error Details: expected 201 "Created", got 400 "Bad Request" Response body: { message: 'ValidationError: Data does not match any schemas from "anyOf"', status: '400', UUID: '1dcf74ce-1c3d-42f0-8725-383282c25fc6' } Error: expected 201 "Created", got 400 "Bad Request" at Test._assertStatus (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:247:11) at Test.assert (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:148:18) at assert (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:127:12) at /home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3) at IncomingMessage.<anonymous> (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:923:12) at nextTickCallbackWith2Args (node.js:458:9) at process._tickDomainCallback (node.js:413:17) Stack Trace: Error: expected 201 "Created", got 400 "Bad Request" at Test._assertStatus (node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (node_modules/supertest/lib/test.js:247:11) at Test.assert (node_modules/supertest/lib/test.js:148:18) at assert (node_modules/supertest/lib/test.js:127:12) at node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (node_modules/supertest/node_modules/superagent/lib/node/index.js:703:3) at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at endReadableNT (_stream_readable.js:923:12) |
if the config file is set correctly
|
BUILD on-http #275 : FAILURE BUILD on-http #275 Error Logs ▼Test Name: Http.Api.Ibms /api/2.0/ibms should fail to PUT an IBM instance with default credential Error Details: expected 400 "Bad Request", got 201 "Created" Response body: { id: '12341234', node: '/api/2.0/nodes/12345678', service: 'ssh-ibm-service', config: { host: '1.1.1.1' } } Error: expected 400 "Bad Request", got 201 "Created" at Test._assertStatus (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:247:11) at Test.assert (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:148:18) at assert (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:127:12) at /home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/node_modules/superagent/lib/node/index.js:691:12) at IncomingMessage.<anonymous> (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:923:12) at nextTickCallbackWith2Args (node.js:458:9) at process._tickDomainCallback (node.js:413:17) Stack Trace: Error: expected 400 "Bad Request", got 201 "Created" at Test._assertStatus (node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (node_modules/supertest/lib/test.js:247:11) at Test.assert (node_modules/supertest/lib/test.js:148:18) at assert (node_modules/supertest/lib/test.js:127:12) at node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (node_modules/supertest/node_modules/superagent/lib/node/index.js:691:12) at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at endReadableNT (_stream_readable.js:923:12) |
|
BUILD on-http #278 : FAILURE BUILD on-http #278 Error Logs ▼Test Name: Http.Api.Ibms /api/2.0/ibms should fail to PUT an IBM instance with default credential Error Details: expected 400 "Bad Request", got 201 "Created" Response body: { id: '12341234', node: '/api/2.0/nodes/12345678', service: 'ssh-ibm-service', config: { host: '1.1.1.1' } } Error: expected 400 "Bad Request", got 201 "Created" at Test._assertStatus (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:247:11) at Test.assert (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:148:18) at assert (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:127:12) at /home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/node_modules/superagent/lib/node/index.js:691:12) at IncomingMessage.<anonymous> (/home/jenkins/workspace/on-http/build-deps/on-http/node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:923:12) at nextTickCallbackWith2Args (node.js:458:9) at process._tickDomainCallback (node.js:413:17) Stack Trace: Error: expected 400 "Bad Request", got 201 "Created" at Test._assertStatus (node_modules/supertest/lib/test.js:232:12) at Test._assertFunction (node_modules/supertest/lib/test.js:247:11) at Test.assert (node_modules/supertest/lib/test.js:148:18) at assert (node_modules/supertest/lib/test.js:127:12) at node_modules/supertest/lib/test.js:124:5 at Test.Request.callback (node_modules/supertest/node_modules/superagent/lib/node/index.js:691:12) at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/lib/node/index.js:922:12) at endReadableNT (_stream_readable.js:923:12) |
…f the config file is set correctly