moto/tests/terraformtests/get_tf_tests.py
2023-11-30 14:55:51 -01:00

21 lines
462 B
Python

import sys
import yaml
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])