Code Review
/
ric-plt
/
sdlgo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "SDL CLI command to generate sdlcli shell completion file for bash"
[ric-plt/sdlgo.git]
/
sdl_private_fn_test.go
diff --git
a/sdl_private_fn_test.go
b/sdl_private_fn_test.go
index
feef2dc
..
fae2a02
100644
(file)
--- a/
sdl_private_fn_test.go
+++ b/
sdl_private_fn_test.go
@@
-35,3
+35,11
@@
func NewSdlInstanceForTest(NameSpace string, instance iDatabase) *SdlInstance {
storage: newSyncStorage(db),
}
}
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)
+}