mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 20:59:53 +05:00
Updated Tests for Guardian from DispatcherSv1
This commit is contained in:
committed by
Dan Christian Bogos
parent
5eb57ed8b1
commit
27b7742ac3
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user