Implement sentinel based DB capacity scaling
[ric-plt/sdlgo.git] / sdl_private_fn_test.go
index 4a4e43e..c60a16f 100644 (file)
    limitations under the License.
 */
 
+/*
+ * This source code is part of the near-RT RIC (RAN Intelligent Controller)
+ * platform project (RICP).
+ */
+
 package sdlgo
 
 //NewSdlInstanceForTest is used in unit tests only in order to replace the
 //underlying redis implementation with mock
 func NewSdlInstanceForTest(NameSpace string, instance iDatabase) *SdlInstance {
+       db := &Database{}
+       db.instances = append(db.instances, instance)
+
        return &SdlInstance{
-               nameSpace:      NameSpace,
-               nsPrefix:       "{" + NameSpace + "},",
-               eventSeparator: "___",
-               iDatabase:      instance,
+               nameSpace: NameSpace,
+               nsPrefix:  "{" + NameSpace + "},",
+               storage:   newSyncStorage(db),
        }
 }