-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added tests for new endpoints 2.0 files #2747
Conversation
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 is great. I've been burned by tests getting skipped silently due to missing test data files and this will help with that, so 👍 from me!
Do we already have a test elsewhere that asserts that Session().get_available_services()
returns more than zero services? If not, that may be worth adding. Otherwise a completely empty data directory would result in these test passing.
I left a few inline comments inline regarding consolidating repeated code.
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.
Great, looking good! A couple more minor comments and I think we're close to done.
@pytest.mark.parametrize("service_name", AVAILABLE_SERVICES) | ||
def test_all_endpoint_tests_exist(service_name): | ||
"""Tests the existence of endpoint-tests-1.json for each service | ||
and verifies that content is present.""" | ||
endpoint_tests_file = os.path.join(TEST_DATA_DIR, service_name, 'endpoint-tests-1.json') | ||
with open(endpoint_tests_file) as f: | ||
data = json.load(f) | ||
assert len(data['testCases']) >= 1 |
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 is now also covered in my branch (currently in WIP PR jonemo#1) together with all other tests that need to access the tests/functional/endpoint-rules
folder.
Resolving, this ended up addressed in a separate PR. |
This PR includes new functional tests that validate the presence and content of new endpoint files such as
endpoint-rule-set.json
,endpoint-tests.json
, andpartitions.json
.