Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR - It sets up a basic acceptance testing framework for Killgrave.
Here's some further information:
Requirements/assumptions
acceptance
Go build flag to avoid being executed with other tests (e.g. unit or integration tests).killgrave
exists in the localbin/
directory at testing time.acceptance
make target that does both.txtar
files to simplify test cases definition.app.Run()
function, so we can also use the same framework and test cases for more like integration tests.The main testing algorithm is:
acceptance/tests
:config.txtar
(imposters, schemas, responses, etc).txtar
file onhttp
directory:req.http
res.http
.So, it's pretty easy to define multiple acceptance/end-2-end tests for different imposters.
Once merged, I'd suggest to consider adding one extra test to this suite as part of the definition of done (DoD) for all the remaining PRs, and for the new ones, unless completely unrelated.
Also, in the near future, we could extend this kind of framework to also assert the Killgrave's output.
Thanks!
PS: I merged #173 because it was a requirement to have ✅ checks here, and the only suggestion I left unresolved was adding more coverage with tests, which is indirectly covered by the changes present here.