Skip to content
This repository has been archived by the owner on Mar 5, 2018. It is now read-only.

[TFF-170] Fix consusd and allow port selection for integration tests #69

Merged
merged 11 commits into from
Feb 7, 2017

Conversation

trevinhofmann
Copy link
Member

@trevinhofmann trevinhofmann commented Jan 25, 2017

Summary

This pull request enables the integration test suite to start the server as a background process on a specific port.

Sister PRs (merge this PR first!):

Checklist

  • Have you added unit and functional tests as appropriate?
  • Did you update/add documentation for new methods or changed functionality?
  • Have you merged the target branch down into this one?

How to Review

  1. Check out the functional-integration-TFF-170 branch on consus
  2. npm install -g
  3. consusd start --port=8081
  4. Verify that the server is listening by opening http://localhost:8081/api/item/all
  5. consusd stop
  6. Verify that the server is no longer listening

Links

@codecov-io
Copy link

codecov-io commented Jan 25, 2017

Codecov Report

Merging #69 into dev will not impact coverage by -0.24%.

@@            Coverage Diff             @@
##              dev      #69      +/-   ##
==========================================
- Coverage   86.11%   85.87%   -0.24%     
==========================================
  Files          16       16              
  Lines         360      361       +1     
==========================================
  Hits          310      310              
- Misses         50       51       +1
Impacted Files Coverage Δ
src/store/item-store.js 93.47% <ø> (ø)
src/store/student-store.js 98.14% <ø> (ø)
src/index.js 0% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c584c77...1156792. Read the comment docs.

@trevinhofmann trevinhofmann changed the title Functional integration tff 170 [TFF-170] Fix consusd and allow port selection for integration tests Jan 28, 2017
@trevinhofmann
Copy link
Member Author

Coverage isn't particularly achievable here, because the index.js isn't something that will be tested by unit/functional tests.

return (arg.match(/^--port=(\d+)$/) || [0, port])[1];
}, 80);

var path = require('path');
Copy link
Contributor

Choose a reason for hiding this comment

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

does ES6 syntax not apply to this file for some reason?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct. This file is not being transpiled by babel.

I suppose we could make a special source folder with es6 and transpile it into bin with babel, but I don't know if that's worthwhile.

Copy link
Contributor

@gearedmonkey gearedmonkey left a comment

Choose a reason for hiding this comment

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

Server started, url worked, server stopped

Copy link
Member

@mattmahn mattmahn left a comment

Choose a reason for hiding this comment

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

ACK

@mattmahn mattmahn merged commit 13eb749 into dev Feb 7, 2017
@mattmahn mattmahn deleted the functional-integration-TFF-170 branch February 7, 2017 18:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants