Commit e55c6d11 authored by kaiyou's avatar kaiyou

Add a cli function to test a notifier

parent 6d27242f
......@@ -51,5 +51,17 @@ def check(function, context, args):
))
@test.command()
@click.option("--function", required=True, help="Which check to test")
@click.option("--context", default="{}", help="JSON string decoded as the context")
@click.option("--args", default="{}", help="JSON string decoded as the arguments")
def notifier(function, context, args):
conf = config.load()
app = scheduler.Scheduler.get_app(conf=conf)
print(scheduler.notify_run(
"dummy", function, json.loads(context), json.loads(args)
))
if __name__ == "__main__":
cli()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment