From 1623489979d0437190654ad3eaf81a4b29b196fc Mon Sep 17 00:00:00 2001 From: lsankar4033 Date: Fri, 7 Aug 2020 14:08:54 -0700 Subject: [PATCH] Placeholder logging_tests command --- logging_tests/test_fail.py | 8 ++++++++ logging_tests/test_success.py | 8 ++++++++ steth.py | 8 ++++++++ 3 files changed, 24 insertions(+) create mode 100644 logging_tests/test_fail.py create mode 100644 logging_tests/test_success.py diff --git a/logging_tests/test_fail.py b/logging_tests/test_fail.py new file mode 100644 index 0000000..3fc8ff3 --- /dev/null +++ b/logging_tests/test_fail.py @@ -0,0 +1,8 @@ +import trio +from pyrum import SubprocessConn, Rumor + +from .utils import * + +@with_rumor +async def run(rumor, args): + return 1 diff --git a/logging_tests/test_success.py b/logging_tests/test_success.py new file mode 100644 index 0000000..24de356 --- /dev/null +++ b/logging_tests/test_success.py @@ -0,0 +1,8 @@ +import trio +from pyrum import SubprocessConn, Rumor + +from .utils import with_rumor + +@with_rumor +async def run(rumor, args): + return 0 diff --git a/steth.py b/steth.py index f466d95..fd53686 100755 --- a/steth.py +++ b/steth.py @@ -61,6 +61,11 @@ def run_test(args): teardown_fixture(fixture) +def run_logging_test(args): + for client in SUPPORTED_CLIENTS: + print(f'Testing client {client}') + + if __name__ == '__main__': steth = argparse.ArgumentParser(description='Stethoscope tool for running multi-client Eth2 scenarios') steth_sub = steth.add_subparsers() @@ -83,5 +88,8 @@ def run_test(args): test.add_argument('-r', '--reuse', default=False, action='store_true', help='reuse running fixtures') test.set_defaults(func=run_test) + test = steth_sub.add_parser('logging_test', help='Display example logs from ./steth.py test. Useful for testing CI integration') + test.set_defaults(func=run_logging_test) + args = steth.parse_args() args.func(args)