diff --git a/migrator/tp_resources_it_test.go b/migrator/tp_resources_it_test.go index d5fc95b71..e8d42021c 100644 --- a/migrator/tp_resources_it_test.go +++ b/migrator/tp_resources_it_test.go @@ -24,6 +24,7 @@ import ( "log" "path" "reflect" + "sort" "testing" "github.com/cgrates/cgrates/config" @@ -150,8 +151,9 @@ func testTpResITCheckData(t *testing.T) { if err != nil { t.Error("Error when getting TpResources ", err.Error()) } + sort.Strings(result[0].ThresholdIDs) if !reflect.DeepEqual(tpResources[0], result[0]) { - t.Errorf("Expecting: %+v, received: %+v", tpResources[0], result[0]) + t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(tpResources[0]), utils.ToJSON(result[0])) } result, err = tpResMigrator.storDBIn.StorDB().GetTPResources( tpResources[0].TPid, tpResources[0].ID) diff --git a/migrator/tp_suppliers_it_test.go b/migrator/tp_suppliers_it_test.go index ba9116690..c9c7d7797 100644 --- a/migrator/tp_suppliers_it_test.go +++ b/migrator/tp_suppliers_it_test.go @@ -24,6 +24,7 @@ import ( "log" "path" "reflect" + "sort" "testing" "github.com/cgrates/cgrates/config" @@ -158,8 +159,9 @@ func testTpSplITCheckData(t *testing.T) { if err != nil { t.Error("Error when getting TpSuppliers ", err.Error()) } + sort.Strings(result[0].FilterIDs) if !reflect.DeepEqual(tpSuppliers[0], result[0]) { - t.Errorf("Expecting: %+v, received: %+v", tpSuppliers[0], result[0]) + t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(tpSuppliers[0]), utils.ToJSON(result[0])) } result, err = tpSplMigrator.storDBIn.StorDB().GetTPSuppliers( tpSuppliers[0].TPid, tpSuppliers[0].ID) diff --git a/migrator/tp_thresholds_it_test.go b/migrator/tp_thresholds_it_test.go index 90a5eb3e0..6f46167d7 100644 --- a/migrator/tp_thresholds_it_test.go +++ b/migrator/tp_thresholds_it_test.go @@ -24,6 +24,7 @@ import ( "log" "path" "reflect" + "sort" "testing" "github.com/cgrates/cgrates/config" @@ -148,8 +149,10 @@ func testTpTresITCheckData(t *testing.T) { if err != nil { t.Error("Error when getting TpThresholds ", err.Error()) } + sort.Strings(result[0].FilterIDs) + sort.Strings(result[0].ActionIDs) if !reflect.DeepEqual(tpThresholds[0], result[0]) { - t.Errorf("Expecting: %+v, received: %+v", tpThresholds[0], result[0]) + t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(tpThresholds[0]), utils.ToJSON(result[0])) } result, err = tpTresMigrator.storDBIn.StorDB().GetTPThresholds( tpThresholds[0].TPid, tpThresholds[0].ID)