-
Notifications
You must be signed in to change notification settings - Fork 77
Add proxy support for switch #628
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
| .set("X-RackHD-API-proxy-ip", "127.0.0.1") | ||
| .set("X-RackHD-API-proxy-port", "7180") | ||
| .expect(200) | ||
| .then(function(res) { |
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.
'res' is defined but never used.
spec/lib/api/2.0/profiles-spec.js
Outdated
| }); | ||
|
|
||
| describe("2.0 GET /profiles/switch/:vendor", function() { | ||
| it.only("should get switch profile via proxy", function() { |
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.
Remove only! I believe this is the reason of huge coverage lost.
fe10cc8 to
c54c378
Compare
|
|
||
| // GET /api/2.0/profiles/switch/:vendor | ||
| var profilesGetSwitchVendor = controller(function(req, res) { | ||
| var requestIp = req.get("X-Real-IP") || req.connection._peername.address; |
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.
@RackHD/corecommitters what is req.connection._peername.address?
|
test this please |
|
jenkins: test this please |
|
test this please |
1 similar comment
|
test this please |
|
BUILD on-http #92 : FAILURE BUILD on-http #92 Error Logs ▼Test Name: Http.Api.Tasks GET /tasks/:id should return 404 if no active task exists Error Details: expected 404 "Not Found", got 500 "Internal Server Error" Response body: { message: '/home/jenkins/workspace/on-http/build-deps/on-http/data/views:2 1| { >> 2| "identifier": "<%= identifier %>", 3| <% if (hasOwnProperty("exit")) { %> 4| "exit": "<%= exit %>", 5| <% } %> identifier is not defined', status: '500', UUID: 'fa56f785-1fc6-4724-9a72-5da76735171d' } Error: expected 404 "Not Found", got 500 "Internal Server Error" 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 404 "Not Found", got 500 "Internal Server Error" 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) |
|
test this please |
|
👍 |
Prioritize "X-Real-IP" for switch getting profile to support proxy.