Cover tests in loader package

This commit is contained in:
porosnicuadrian
2020-12-15 17:52:18 +02:00
committed by Dan Christian Bogos
parent 6aba024875
commit 128e1d7dad
2 changed files with 821 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ package engine
import (
"reflect"
"strings"
"testing"
"github.com/cgrates/cgrates/utils"
@@ -126,7 +127,8 @@ func TestCurrentDBVersions(t *testing.T) {
}
//Compare AllVersions
if rcv := expVersDataDB.Compare(expVersStorDB, utils.INTERNAL, true); rcv != "cgr-migrator -exec=*accounts" {
t.Error(rcv)
expStr := "cgr-migrator"
if rcv := expVersDataDB.Compare(expVersStorDB, utils.INTERNAL, true); !strings.Contains(rcv, expStr) {
t.Errorf("Expected %+v, received %+v", expStr, rcv)
}
}