mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Fixed indetation
This commit is contained in:
committed by
Dan Christian Bogos
parent
710dafad8e
commit
4aae1cdcb1
@@ -116,7 +116,7 @@ func testAPIerResetStorDb(t *testing.T) {
|
||||
|
||||
// Start CGR Engine
|
||||
func testAPIerStartEngineSleep(t *testing.T) {
|
||||
time.Sleep(500*time.Millisecond)
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
if _, err := engine.StopStartEngine(apierCfgPath, *waitRater); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -363,7 +363,7 @@ func testApierSetAndRemoveRatingProfileAnySubject(t *testing.T) {
|
||||
Id: "*out:cgrates.org:sms:*any",
|
||||
RatingPlanActivations: engine.RatingPlanActivations{
|
||||
{
|
||||
ActivationTime: time.Date(2014, 1, 14, 0, 0, 0,0, time.UTC),
|
||||
ActivationTime: time.Date(2014, 1, 14, 0, 0, 0, 0, time.UTC),
|
||||
RatingPlanId: "RP_SMS",
|
||||
},
|
||||
},
|
||||
@@ -393,7 +393,6 @@ func testApierSetAndRemoveRatingProfileAnySubject(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func testAPIerKillEngine(t *testing.T) {
|
||||
if err := engine.KillEngine(*waitRater); err != nil {
|
||||
t.Error(err)
|
||||
|
||||
@@ -2077,13 +2077,12 @@ func testApierStopEngine(t *testing.T) {
|
||||
|
||||
func TestAttrRemoveRatingProfileGetID(t *testing.T) {
|
||||
attr := &AttrRemoveRatingProfile{
|
||||
Tenant: "cgrates.org",
|
||||
Tenant: "cgrates.org",
|
||||
Category: "sms",
|
||||
Subject: "*any",
|
||||
Subject: "*any",
|
||||
}
|
||||
expRes := "*out:cgrates.org:sms:*any"
|
||||
if rply := attr.GetId(); rply != expRes {
|
||||
t.Errorf("Expected %+v, received %v", expRes, rply)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -286,6 +286,13 @@ func TestMultiplyConverterConvert(t *testing.T) {
|
||||
} else if !reflect.DeepEqual(rcv, 0.0) {
|
||||
t.Errorf("Expected %+v received: %+v", 0, rcv)
|
||||
}
|
||||
|
||||
m.Value = 2
|
||||
if rcv, err := m.Convert(3); err != nil {
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(rcv, 6.0) {
|
||||
t.Errorf("Expected %+v received: %+v", 0, rcv)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewDivideConverter(t *testing.T) {
|
||||
|
||||
@@ -60,7 +60,7 @@ func MissingStructFields(s interface{}, mandatories []string) []string {
|
||||
sType := sValue.Type()
|
||||
for _, fieldName := range mandatories {
|
||||
fldStr, ok := sType.FieldByName(fieldName)
|
||||
if !ok || fieldByIndexIsEmpty(sValue, fldStr.Index){
|
||||
if !ok || fieldByIndexIsEmpty(sValue, fldStr.Index) {
|
||||
missing = append(missing, fieldName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user