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): ...@@ -51,5 +51,17 @@ def check(function, context, args):
)) ))
@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)
"dummy", function, json.loads(context), json.loads(args)
if __name__ == "__main__": if __name__ == "__main__":
cli() cli()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment