-
Notifications
You must be signed in to change notification settings - Fork 4
Handle clients-tests requires section #48
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
Conversation
setup_steps = test_step | ||
elif test_name == "teardown": | ||
teardown_steps = test_step | ||
else: | ||
test_numbers_and_steps.append((test_number, test_step)) | ||
test_number += 1 | ||
|
||
if not requires["serverless"]: |
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.
Can a test not have a requires
section, or have it, but not have a serverless
key in it? Not sure if that is possible, but I think it would make sense to protect against a crash here.
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.
It's not possible. If it happens, I'd rather crash loudly than making a wrong choice (offensive programming vs. defensive programming). After all, we fully control the tests here.
@@ -568,20 +568,25 @@ def remove_implicit_resolver(cls, tag_to_remove): | |||
# Each file may have a "test" named 'setup' or 'teardown', |
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.
This comment should also mention the requires
section.
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.
Thanks, addressed in 545a1cc
(#48)
Here's an example YAML file https://github.com/elastic/elasticsearch-clients-tests/blob/main/tests/ping/ping.yml. The "requires" sections were mistaken for actual tests to run until now.