def test_jenkins_tests1(self): custom_metadata = {'BUILD_TIMESTAMP': '1439781362656', 'BUILD_SERVER_URI': 'http://my-jenkins:8080', 'JOB_NAME': 'test-executor', 'ROOT_JOB_NAME': 'product-root', 'BUILD_URI_PATH': 'jobs/test-executor', 'BUILD_RESULT': 'UNSTABLE', 'BUILD_NUMBER': '50', 'ROOT_BUILD_NUMBER': '40', 'CUSTOM_TAGS': 'MYTAG1,MYTAG2', 'MYTAG1': 'MYTAG1_VALUE', 'MYTAG2': 'MYTAG2_VALUE'} output = execute_processor(data_file_path('jenkins-tests1.json'), custom_metadata=custom_metadata) output_json = json.loads(output.decode("utf-8")) # print(output.decode("utf-8")) # this is what we expect with open(data_file_path('result-tests1.json'), "rt") as myfile: expected_json = json.load(myfile) compare(expected_json, output_json, strict=True)
def test_circleci_tests1(self): custom_metadata = {'SCM_BRANCH': 'master', 'SCM_REPO_NAME': 'jenkins-tests-processor', 'SCM_URL': 'https://github.com/gaia-adm/jenkins-tests-processor', 'BUILD_SERVER_URI': 'https://circleci.com', 'BUILD_URI': 'https://circleci.com/gh/gaia-adm/jenkins-tests-processor/12', 'BUILD_NUMBER': '12', 'BUILD_STATUS': 'success', 'BUILD_START_TIME': '2015-08-18T08:59:27.444Z'} output = execute_processor(data_file_path('circleci-tests1.json'), custom_metadata=custom_metadata) output_json = json.loads(output.decode("utf-8")) # print(output.decode("utf-8")) # this is what we expect with open(data_file_path('result-tests1.json'), "rt") as myfile: expected_json = json.load(myfile) compare(expected_json, output_json, strict=True)