moto/tests/terraformtests/get_tf_tests.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
461 B
Python
Raw Normal View History

import yaml
import sys
def print_test_names(service):
with open("tests/terraformtests/terraform-tests.success.txt") as f:
dct = yaml.load(f, Loader=yaml.FullLoader)
tests = dct.get(service)
if len(tests) == 1:
print(tests[0])
else:
print('"(' + "|".join(tests) + ')"')
if __name__ == "__main__":
if len(sys.argv) != 2:
print("")
else:
print_test_names(service=sys.argv[1])