From e449719892a6aed2cb005e50e4ec3f41fffcd0df Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Fri, 4 Aug 2023 12:34:01 -0400 Subject: [PATCH] Fix integration test in migrator Generic NOT_FOUND has been replaced by DSP_PROFILE_NOT_FOUND for dispatcher profiles. --- migrator/dispatchers_it_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migrator/dispatchers_it_test.go b/migrator/dispatchers_it_test.go index 211d64d02..d43e402c2 100644 --- a/migrator/dispatchers_it_test.go +++ b/migrator/dispatchers_it_test.go @@ -228,10 +228,10 @@ func testDspITMigrateAndMove(t *testing.T) { if !reflect.DeepEqual(result, dspPrf) { t.Errorf("Expecting: %+v, received: %+v", dspPrf, result) } - result, err = dspMigrator.dmIN.DataManager().GetDispatcherProfile("cgrates.org", + _, err = dspMigrator.dmIN.DataManager().GetDispatcherProfile("cgrates.org", "Dsp1", false, false, utils.NonTransactional) - if err != utils.ErrNotFound { - t.Error(err) + if err == nil || err.Error() != utils.ErrNotFound.Error() { + t.Errorf("expected: %v,\nreceived: %v", utils.ErrDSPProfileNotFound, err) } resultHost, err := dspMigrator.dmOut.DataManager().GetDispatcherHost("cgrates.org", @@ -242,7 +242,7 @@ func testDspITMigrateAndMove(t *testing.T) { if !reflect.DeepEqual(resultHost, dspHost) { t.Errorf("Expecting: %+v, received: %+v", dspHost, resultHost) } - resultHost, err = dspMigrator.dmIN.DataManager().GetDispatcherHost("cgrates.org", + _, err = dspMigrator.dmIN.DataManager().GetDispatcherHost("cgrates.org", "ALL", false, false, utils.NonTransactional) if err != utils.ErrDSPHostNotFound { t.Error(err)