Skip to content
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

Use sessions #2

Open
mrozbarry opened this issue Aug 20, 2019 · 0 comments
Open

Use sessions #2

mrozbarry opened this issue Aug 20, 2019 · 0 comments

Comments

@mrozbarry
Copy link
Contributor

We should use the session management from node-lights to ensure no two computers are trying to control the lights at once.

Tasks

  1. Update the api.* light functions to accept the token as a parameter
  2. On run start, get a token* (const session = await api.sessionCreate()).
  3. Store it somewhere, like /tmp/jest-lights/session.json. There is also a node_modules/.cache folder that we could take advantage of.
  4. Set lights status during test
  5. On run end, set the status light
  • Token could be retrieved either by file or by API call

Other things

Related to this node-trafficlights ticket, being that we shouldn't have to shut off the lights from jest, we should rely on the server to shut it off after an appropriate amount of time.

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

No branches or pull requests

1 participant