-
Notifications
You must be signed in to change notification settings - Fork 6
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
Integration test "framework" #846
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mieciu
requested review from
nablaone,
jakozaur,
trzysiek,
avelanarius and
pdelewski
October 7, 2024 09:37
avelanarius
reviewed
Oct 7, 2024
Error wording fixes test remove dup simplify simplify one more test scaffolding for github ci job scaffolding for github ci job scaffolding for github ci job remove śmieszkowanie
avelanarius
reviewed
Oct 7, 2024
// This returns 500 Internal Server Error, but will be tackled in separate PR. | ||
// (The table has not yet been discovered by Quesma ) | ||
// ERR quesma/quesma/quesma.go:198 > quesma request failed: Q2002: Missing table. Table: test_table: can't load test_table table opaque_id= path=/test_table/_search reason="Missing table." request_id=01926654-b214-7e1d-944a-a7545cd7d419 | ||
resp, err = a.RequestToQuesma(ctx, "GET", "/test_table/_search", []byte(`{"query": {"match_all": {}}}`)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An idea for the future: we could also test if Elastic's go client can connect to Quesma and query it correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like it! 💯
avelanarius
approved these changes
Oct 7, 2024
auto-merge was automatically disabled
October 7, 2024 11:16
Pull request was closed
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 7, 2024
Having problems with GitHub CI lately, so just in case I closed the [older PR](#846) and created this one 🤞
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
How to run this:
What I really wanted to achieve here is to provide some sort of separation between test infra setup and the tests themselves.
The ITs are listed in
ci/it/integration_test.go
.Each test is a separate struct living a a separate file. The test struct exposes handy methods like
RequestToQuesma()
,RequestToElasticsearch()
,ExecuteClickHouseStatement()
anda.ExecuteClickHouseQuery()
.The whole test logic lives in overriden
RunTests
function.Under the hood, there's whole machinery which spins up required docker containers and creates dedicated Quesma config file based on the provided template. Good news is, one does not have to touch it in order to run and contribute to the tests 😉