From 27b7742ac3564fe762bf086cfbc108c2975808cb Mon Sep 17 00:00:00 2001 From: Tripon Alexandru-Ionut Date: Wed, 27 Mar 2019 16:22:30 +0200 Subject: [PATCH] Updated Tests for Guardian from DispatcherSv1 --- dispatchers/guardian_it_test.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/dispatchers/guardian_it_test.go b/dispatchers/guardian_it_test.go index ccc6a2fa9..efa15b2c7 100644 --- a/dispatchers/guardian_it_test.go +++ b/dispatchers/guardian_it_test.go @@ -30,6 +30,7 @@ import ( var sTestsDspGrd = []func(t *testing.T){ testDspGrdPing, + testDspGrdLock, } //Test start here @@ -37,10 +38,6 @@ func TestDspGuardianSTMySQL(t *testing.T) { testDsp(t, sTestsDspGrd, "TestDspGuardianS", "all", "all2", "attributes", "dispatchers", "tutorial", "oldtutorial", "dispatchers") } -func TestDspGuardianSMongo(t *testing.T) { - testDsp(t, sTestsDspGrd, "TestDspGuardianS", "all", "all2", "attributes_mongo", "dispatchers_mongo", "tutorial", "oldtutorial", "dispatchers") -} - func testDspGrdPing(t *testing.T) { var reply string if err := allEngine.RCP.Call(utils.GuardianSv1Ping, new(utils.CGREvent), &reply); err != nil { @@ -80,8 +77,6 @@ func testDspGrdLock(t *testing.T) { }, }, &reply); err != nil { t.Error(err) - } else if reply != utils.Pong { - t.Errorf("Received: %s", reply) } var unlockReply []string @@ -95,10 +90,7 @@ func testDspGrdLock(t *testing.T) { }, }, &unlockReply); err != nil { t.Error(err) - } else if reply != utils.Pong { - t.Errorf("Received: %s", reply) - } - if !reflect.DeepEqual(args.LockIDs, unlockReply) { + } else if !reflect.DeepEqual(args.LockIDs, unlockReply) { t.Errorf("Expected: %s , received: %s", utils.ToJSON(args.LockIDs), utils.ToJSON(unlockReply)) } }