-
Notifications
You must be signed in to change notification settings - Fork 853
Support replay-only AuTest YAML tests #13035
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,6 +22,8 @@ import os | |||||||||||||||
| import re | ||||||||||||||||
| import yaml | ||||||||||||||||
|
|
||||||||||||||||
| ATS_REPLAY_TEST_EXTENSIONS = ['.test.yaml', '.test.yml'] | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| def configure_ats(obj: 'TestRun', server: 'Process', ats_config: dict, dns: Optional['Process'] = None): | ||||||||||||||||
| '''Configure ATS per the configuration in the replay file. | ||||||||||||||||
|
|
@@ -205,24 +207,43 @@ def _requires_persistent_ats(ats_config: dict) -> bool: | |||||||||||||||
| return bool(ats_config.get('metric_checks')) | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| def ATSReplayTest(obj, replay_file: str): | ||||||||||||||||
| '''Create a TestRun that configures ATS and runs HTTP traffic using the replay file. | ||||||||||||||||
| def _is_list_action(obj) -> bool: | ||||||||||||||||
| return obj.Variables.Autest.Action == 'list' | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
|
Comment on lines
+211
to
+213
|
||||||||||||||||
| return obj.Variables.Autest.Action == 'list' | |
| action = getattr(getattr(getattr(obj, 'Variables', None), 'Autest', None), 'Action', None) | |
| if action is not None: | |
| return action == 'list' | |
| subcommand = getattr(getattr(obj, 'Arguments', None), 'subcommand', None) | |
| return subcommand == 'list' |
Copilot
AI
Mar 30, 2026
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 registers a new AuTest test format via RegisterTestFormat, which is called unconditionally at import time. The repository’s AuTest minimum version check in init.cli.ext still pins to 1.10.4; if that version doesn’t provide RegisterTestFormat (as implied by the upstream dependency), test initialization will fail before any tests run. Update the minimum required AuTest version (or guard the registration when the API isn’t available) so the version gate matches the new dependency.
| RegisterTestFormat(_load_ats_replay_test_file, "ATSReplayYAMLTest", ext=ATS_REPLAY_TEST_EXTENSIONS) | |
| if 'RegisterTestFormat' in globals(): | |
| RegisterTestFormat(_load_ats_replay_test_file, "ATSReplayYAMLTest", ext=ATS_REPLAY_TEST_EXTENSIONS) |
This file was deleted.
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.
The code supports both
.test.yamland.test.yml(seeATS_REPLAY_TEST_EXTENSIONS), but this doc only mentions.test.yaml. Consider mentioning.test.ymltoo so users know both forms are discoverable.