Merge "RIC:1060: Change in PTL"
[ric-plt/sdlgo.git] / sdl_private_fn_test.go
index c60a16f..fae2a02 100644 (file)
@@ -24,6 +24,7 @@ package sdlgo
 
 //NewSdlInstanceForTest is used in unit tests only in order to replace the
 //underlying redis implementation with mock
+//Deprecated: Will be removed in a future release.
 func NewSdlInstanceForTest(NameSpace string, instance iDatabase) *SdlInstance {
        db := &Database{}
        db.instances = append(db.instances, instance)
@@ -34,3 +35,11 @@ func NewSdlInstanceForTest(NameSpace string, instance iDatabase) *SdlInstance {
                storage:   newSyncStorage(db),
        }
 }
+
+// NewSyncStorageForTest is used only in unit tests to mock database.
+func NewSyncStorageForTest(dbMock iDatabase) *SyncStorage {
+       db := &Database{}
+       db.instances = append(db.instances, dbMock)
+
+       return newSyncStorage(db)
+}