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

Create some tests #6

Open
1 of 3 tasks
ageorgou opened this issue May 2, 2018 · 3 comments
Open
1 of 3 tasks

Create some tests #6

ageorgou opened this issue May 2, 2018 · 3 comments
Assignees
Labels
infrastructure Tests, documentation, deployment etc

Comments

@ageorgou
Copy link
Contributor

ageorgou commented May 2, 2018

Copied from oracc/elastic-search-poc#5:

@raquel-ucl commented:

We can have a few tests that run ingestions and queries in travis:
https://docs.travis-ci.com/user/database-setup/#ElasticSearch

Things we can test (to be expanded):

  • Glossary data is broken down correctly from the JSON
  • Data is uploaded correctly to ES and is accessible (partly done in Partial search #20)
  • The Flask server returns expected results, with the correct headers for CORS.

This may need a little refactoring and/or patching so we can run test uploads/searches on a separate index. I'm not sure whether something like ElasticMock is useful to us, but possibly worth looking at as an alternative.

@ageorgou
Copy link
Contributor Author

Partly addressed in #12, but some work remains, especially with checking the Flask server's response.

@raquelalegre
Copy link
Contributor

@raquel-ucl is going to do some work on "The Flask server returns expected results, with the correct headers for CORS".

@ageorgou ageorgou mentioned this issue Oct 30, 2018
7 tasks
@ageorgou ageorgou added the infrastructure Tests, documentation, deployment etc label May 17, 2019
@ageorgou
Copy link
Contributor Author

ageorgou commented Jun 4, 2019

Some useful resources:

The pytest-elasticsearch plugin looks like it can help us with a session-scoped Elasticsearch instance, rather than creating and destroying the index for every test, as we do now.

We can test the web server endpoints through the Workzeug test client that Flask exposes (see another example here).

@ageorgou ageorgou mentioned this issue Jun 4, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Tests, documentation, deployment etc
Projects
None yet
Development

No branches or pull requests

2 participants