Skip to content

Reduce the execution time of Remap ACL AuTest #11917

@masaori335

Description

@masaori335

We have ton of test cases in reamp_acl.test.py (AuTest), each of test cases starts and stop ATS and origin server. It takes long long time (over 5 min).

"""
Test all acl combinations
"""
for idx, test in enumerate(all_acl_combination_tests):
(_, replay_file_name) = tempfile.mkstemp(suffix="acl_table_test_{}.replay".format(idx))
replay_proxy_response(
"base.replay.yaml",
replay_file_name,
test["GET response"],
test["POST response"],
)
Test_remap_acl(
"{0} {1} {2}".format(test["inline"], test["named_acl"], test["ip_allow"]),
replay_file=replay_file_name,
ip_allow_content=test["ip_allow"],
deactivate_ip_allow=False,
acl_behavior_policy=0 if test["policy"] == "legacy" else 1,
acl_configuration=test["inline"],
named_acls=[("acl", test["named_acl"])] if test["named_acl"] != "" else [],
expected_responses=[test["GET response"], test["POST response"]],
)

This is just a random idea, but probably, we can have few big remap.configs that has many remap rules that represents combinations and keep ATS running during the test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions