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

Write a simple smoke test #35

Closed
emiln opened this issue Jun 17, 2015 · 1 comment · Fixed by #47
Closed

Write a simple smoke test #35

emiln opened this issue Jun 17, 2015 · 1 comment · Fixed by #47

Comments

@emiln
Copy link
Owner

emiln commented Jun 17, 2015

It would be a nice smoke test to connect to a network and ensure the the hello event is actually received.

@emiln
Copy link
Owner Author

emiln commented Oct 20, 2015

This is a good use-case for await!, but there's the risk that no :hello event is ever sent and that the smoke test will block indefinitely. I suggest extending await! to take an optional timeout.

emiln pushed a commit that referenced this issue Oct 21, 2015
Issue #35

This commit adds a new category of tests: smoke tests. What's a smoke
test? When you plug your new fancy electronics device into the socket,
does sinister black smoke erupt from the circuits? Colloquially: does it
work at all in a real-life scenario?

The specific smoke test added attempts to connect to Slack using a Slack
bot token that is expected to be available as an environment variable
called SLACK_BOT_TOKEN. It will then await the :hello event from the
server and fail unless this is received within 5 seconds.

Awaiting an event in a test necessitated a slight modification to the
await! function: it will work as before, but now you can optionally
supply a second argument, which will be used as a timeout. If nothing
has happened within the timeout, nil is returned.
@emiln emiln closed this as completed in #47 Oct 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant