Closed jmartin-sul closed 5 years ago
the plan is to use swagger-codegen to generate a JS client from the swagger.yaml
. we hope to use this client code both for talking with sinopia server/trellis IRL, and for writing integration tests against the server.
open questions:
other things that were considered, but that we're passing on:
answers to some of the above:
how do we spin up the server automatically for testing
see #21. docker-compose up
in a cicrcle-ci build where the tests are run in a machine executor job. would like to move off the machine executor if possible, but not a high priority at the moment.
do we need to seed some known test data in our test trellis-ext-db instance?
probably. the tests will likely need to do some setup of expected data.
do we need to write any more client code (not for testing)? or does swagger-codegen provide us with a fully implemented client that we can use?
seems like hopefully "no" and "yes", respectively.
if/when the swagger spec changes, what's a sane strategy for regenerating the client code and updating the tests as needed?
still no good answer for this one.