Skip to content

Conversation

@pengz1
Copy link
Member

@pengz1 pengz1 commented Apr 21, 2017

Existing progress data pre-validation will reject 0 value, this is not expected.
This PR enhances progress data pre-validation and pack them in a Promise.try.
Also negative and boundary tests are added.

@pengz1
Copy link
Member Author

pengz1 commented Apr 21, 2017

@JenkinsRHD
Copy link
Contributor

BUILD on-http #111 : FAILURE

BUILD on-http #111 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: 'dad0d04c-54ab-40de-94ab-969578d39a92' } 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)

 * Existing progress data pre-validation will reject 0 value
 * Enhance progress data pre-validation and pack them in a Promise.try
.expect(400);
});

it('should return 400 if maximum is invalid in body', function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change maximum to value

Copy link
Contributor

@yyscamper yyscamper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 after fixing the comment

@pengz1 pengz1 force-pushed the Fix-notification-progress-data-pre-validation-error branch from fc76ece to 5da6e15 Compare April 22, 2017 13:50
@yyscamper yyscamper merged commit 324f6e1 into RackHD:master Apr 25, 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.

4 participants