From 31a916eabb300ebcd499053561527cb5c0bc2a66 Mon Sep 17 00:00:00 2001 From: andronache98 Date: Mon, 20 Dec 2021 17:02:27 +0200 Subject: [PATCH] Added panic api for testing for coresv1 --- apis/cores.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apis/cores.go b/apis/cores.go index 31fe51ab7..8f89e2d09 100644 --- a/apis/cores.go +++ b/apis/cores.go @@ -67,3 +67,13 @@ func (cS *CoreSv1) StartMemoryProfiling(ctx *context.Context, args *utils.Memory func (cS *CoreSv1) StopMemoryProfiling(ctx *context.Context, args *utils.TenantWithAPIOpts, reply *string) error { return cS.cS.V1StopMemoryProfiling(ctx, args, reply) } + +type PanicMessageArgs struct { + Tenant string + APIOpts map[string]interface{} + Message string +} + +func (cS *CoreSv1) Panic(args *PanicMessageArgs, _ *string) error { + panic(args.Message) +}