blob: ef14e2c9d115c2bf417656667d26340676e290ad [file] [log] [blame] [edit]
"""Update continuous_tests config expected content.
Expectation files will be updated with the parsed versions of the staging and
production continuous_tests.protoascii files.
These files should be used to verify config changes have had the expected
effect.
"""
from catatester import config_utils
def _write_expectation(message, path):
with open(path, 'w') as f:
f.write(str(message))
def main():
print('Updating prod config expectation.')
prod_message = config_utils.parse_continuous_tests_protoascii(
config_utils.PROD_CONFIG_PATH)
_write_expectation(prod_message, config_utils.PROD_EXPECTATION_PATH)
print('Updating staging config expectation.')
staging_message = config_utils.parse_continuous_tests_protoascii(
config_utils.STAGING_CONFIG_PATH)
_write_expectation(staging_message, config_utils.STAGING_EXPECTATION_PATH)
if __name__ == '__main__':
main()