def get_shipit_api_instance(shipit_config): (tc_client_id, tc_access_token, api_root, timeout_in_seconds) = get_auth_primitives_v2(shipit_config) release_api = Release_V2(taskcluster_client_id=tc_client_id, taskcluster_access_token=tc_access_token, api_root=api_root, timeout=timeout_in_seconds) headers = get_request_headers(api_root) return release_api, headers
def mark_as_shipped_v2(ship_it_instance_config, release_name): """Function to make a simple call to Ship-it API v2 to change a release status to 'shipped' """ (taskcluster_client_id, taskcluster_access_token, api_root, timeout_in_seconds) = get_auth_primitives_v2(ship_it_instance_config) release_api = shipitapi.Release_V2( taskcluster_client_id=taskcluster_client_id, taskcluster_access_token=taskcluster_access_token, api_root=api_root, timeout=timeout_in_seconds) log.info('Marking the release as shipped...') release_api.update_status(release_name, status='shipped') check_release_has_values_v2(release_api, release_name, status='shipped')
def test_get_auth_primitives_v2(ship_it_instance_config, expected): assert get_auth_primitives_v2(ship_it_instance_config) == expected