Skip to content

Conversation

@pengz1
Copy link
Member

@pengz1 pengz1 commented Apr 11, 2017

Prioritize "X-Real-IP" for switch getting profile to support proxy.

.set("X-RackHD-API-proxy-ip", "127.0.0.1")
.set("X-RackHD-API-proxy-port", "7180")
.expect(200)
.then(function(res) {

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.

@pengz1
Copy link
Member Author

pengz1 commented Apr 11, 2017

});

describe("2.0 GET /profiles/switch/:vendor", function() {
it.only("should get switch profile via proxy", function() {
Copy link
Contributor

@yyscamper yyscamper Apr 12, 2017

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.

@pengz1 pengz1 force-pushed the Add-proxy-support-for-switch branch from fe10cc8 to c54c378 Compare April 12, 2017 14:08

// GET /api/2.0/profiles/switch/:vendor
var profilesGetSwitchVendor = controller(function(req, res) {
var requestIp = req.get("X-Real-IP") || req.connection._peername.address;
Copy link
Member

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?

@PengTian0
Copy link
Contributor

test this please

@yyscamper
Copy link
Contributor

jenkins: test this please

@PengTian0
Copy link
Contributor

test this please

1 similar comment
@PengTian0
Copy link
Contributor

test this please

@JenkinsRHD
Copy link
Contributor

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| { &gt;&gt; 2| &#34;identifier&#34;: &#34;&lt;%= identifier %&gt;&#34;, 3| &lt;% if (hasOwnProperty(&#34;exit&#34;)) { %&gt; 4| &#34;exit&#34;: &#34;&lt;%= exit %&gt;&#34;, 5| &lt;% } %&gt; 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)

@panpan0000
Copy link
Contributor

test this please

@sunnyqianzhang
Copy link
Member

👍

@yyscamper yyscamper merged commit 1665804 into RackHD:master Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants