Exemplo n.º 1
0
def list_tests(context, id):
    j = base.get(context, RESOURCE, id=id).json()['job']
    result = {'tests': []}
    result['tests'] += jobdefinition.get_tests(
        context, j['jobdefinition_id']).json()['tests']
    result['tests'] += remoteci.get_tests(
        context, j['remoteci_id']).json()['tests']
    return result
Exemplo n.º 2
0
def list_test(context, id):
    """unattach_test(context, id, test_id)

    Unattach a test from a remoteci.

    >>> dcictl remoteci-unattach-test [OPTIONS]

    :param string id: ID of the remoteci to unattach the test from
                      [required]
    :param string test_id: ID of the test to unattach [required]
    """
    result = remoteci.get_tests(context, id=id)
    utils.format_output(result, context.format,
                        test.RESOURCE,
                        test.TABLE_HEADERS)