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

Testing storages in a more generic way. #66

Closed
anonrig opened this issue Jan 2, 2016 · 4 comments
Closed

Testing storages in a more generic way. #66

anonrig opened this issue Jan 2, 2016 · 4 comments

Comments

@anonrig
Copy link
Contributor

anonrig commented Jan 2, 2016

A generic solution to testing and enforcing tests for separate storage units can be found.

Proposed solution is:

After initialization of the controller:

var controller = Botkit.slackbot({
  storage: my_storage_provider
})

Botkit.slackbot constructor can automatically test the storage tests and if test fails, we prompt a message to user and terminate the botkit process.

If --force is used, we skip the test and run the application without any testing.

@RafaelCosman
Copy link
Contributor

Cool! We'd have to make sure to test the storage in a way which doesn't effect the storage. Because folks might have sensitive data in there or triggers for changes like Firebase has. So this might not be desirable.

@anonrig
Copy link
Contributor Author

anonrig commented Jan 24, 2016

We should mock the storage functionality and not test it using the config given to the botkit.

@colestrode
Copy link
Contributor

You could just inspect the interface and make sure all required methods are present. I don't think there's much you can do beyond that without writing/fetching data. I agree with @RafaelCosman that you wouldn't want to do that as part of a test.

@peterswimm
Copy link
Contributor

This could be considered as part of #850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants