From c41bbcf11986e6ef20e92a596c8adf5a4c3211b3 Mon Sep 17 00:00:00 2001 From: gezimbll Date: Mon, 20 May 2024 07:40:49 -0400 Subject: [PATCH] revised janusagent and thresholds it test --- agents/janusagent_it_test.go | 9 +++++---- apier/v1/thresholds_it_test.go | 1 + data/conf/samples/janus_agent/cgrates.json | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/agents/janusagent_it_test.go b/agents/janusagent_it_test.go index c9094c103..325470cf0 100644 --- a/agents/janusagent_it_test.go +++ b/agents/janusagent_it_test.go @@ -44,6 +44,7 @@ var ( janCfgPath string janCfgDIR string janCfg *config.CGRConfig + janBin string janRPC *birpc.Client sTestsJanus = []func(t *testing.T){ testJanitInitCfg, @@ -66,6 +67,10 @@ func TestJanusit(t *testing.T) { default: t.Fatal("Unknown Database type") } + janBin, err = exec.LookPath("/opt/janus/bin/janus") + if err != nil || janBin == "" { + t.SkipNow() + } for _, stests := range sTestsJanus { t.Run(janCfgDIR, stests) } @@ -104,10 +109,6 @@ func testJanitApierRpcConn(t *testing.T) { } func testJanCmd(t *testing.T) { - janBin, err := exec.LookPath("/opt/janus/bin/janus") - if err != nil || janBin == "" { - t.SkipNow() - } cmd := exec.Command(janBin) if err := cmd.Start(); err != nil { t.Fatal(err) diff --git a/apier/v1/thresholds_it_test.go b/apier/v1/thresholds_it_test.go index 5ed485165..67b0b347b 100644 --- a/apier/v1/thresholds_it_test.go +++ b/apier/v1/thresholds_it_test.go @@ -700,6 +700,7 @@ func testV1TSUpdateSnooze(t *testing.T) { FilterIDs: []string{"*string:~*req.CustomEv:SnoozeEv"}, MinSleep: 10 * time.Minute, Weight: 100, + MaxHits: -1, }, } //set diff --git a/data/conf/samples/janus_agent/cgrates.json b/data/conf/samples/janus_agent/cgrates.json index 184982a58..e549a1786 100644 --- a/data/conf/samples/janus_agent/cgrates.json +++ b/data/conf/samples/janus_agent/cgrates.json @@ -18,7 +18,6 @@ "db_type": "*internal", }, - "rals": { "enabled": true, "max_increments":3000000,