Beispiel #1
0
        if args.stop_on_failure and len(_FAIL) > 0:
            print("Detected failure, stopping tests")
            sys.exit(1)
        test(api)

    print()
    print("----------")
    print("| REPORT |")
    print("----------")
    print("Tenant:", config['tenant'])
    print("PASSED:", len(_PASS))
    print("FAILED:", len(_FAIL))
    for name, e in _FAIL:
        print(name)
        print(e)
    print("XFAILED:", len(_XFAIL))
    for name, e in _XFAIL:
        print(name)
        print(e)
    print("SKIPPED:", len(_SKIP))


if __name__ == "__main__":
    parser = scaffold.get_argparser()
    parser.add_argument("-f", "--filter", default=[], action='append')
    parser.add_argument("-l", "--list-tests", action="store_true")
    parser.add_argument("-x", "--stop-on-failure", action="store_true")
    args = parser.parse_args()
    VERBOSE = args.verbose
    sys.exit(main(args))
Beispiel #2
0
                               args.metrics_op)
        except ValueError:
            print("--metrics argument must be in format '--metrics i,t' where"
                  "'i' is the interval in seconds and 't' is the timeout in "
                  "seconds.  Both must be positive integers >= 1")
            return FAILURE
        if data:
            write_metrics(data, args.metrics_out_file)
        else:
            print("No data recieved from metrics")
            return FAILURE
    return SUCCESS


if __name__ == '__main__':
    tparser = scaffold.get_argparser(add_help=False)
    parser = argparse.ArgumentParser(
        parents=[tparser], formatter_class=argparse.RawTextHelpFormatter)

    # Health Check
    parser.add_argument('--health',
                        action='store_true',
                        help='Run a quick health check')

    # System Inspection
    parser.add_argument('--show-at-url',
                        action='append',
                        default=[],
                        help='Show resource located at url.  Not for use'
                        'with events and alerts.  Use --list for those')
    parser.add_argument('--list',