Rename SQLServer state ctor to existing pattern (#176)
This commit is contained in:
parent
70381d8312
commit
db8b6135d6
|
@ -63,8 +63,8 @@ const (
|
|||
defaultSchema = "dbo"
|
||||
)
|
||||
|
||||
// NewSQLServerStore creates a new instance of a Sql Server transaction store
|
||||
func NewSQLServerStore() *SQLServer {
|
||||
// NewSQLServerStateStore creates a new instance of a Sql Server transaction store
|
||||
func NewSQLServerStateStore() *SQLServer {
|
||||
store := SQLServer{}
|
||||
store.migratorFactory = newMigration
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ func getTestStoreWithKeyType(t *testing.T, kt KeyType, indexedProperties string)
|
|||
ensureDBIsValid(t)
|
||||
schema := getUniqueDBSchema()
|
||||
metadata := createMetadata(schema, kt, indexedProperties)
|
||||
store := NewSQLServerStore()
|
||||
store := NewSQLServerStateStore()
|
||||
err := store.Init(metadata)
|
||||
assert.Nil(t, err)
|
||||
|
||||
|
@ -787,7 +787,7 @@ func testMultipleInitializations(t *testing.T) {
|
|||
t.Run(test.name, func(t *testing.T) {
|
||||
store := getTestStoreWithKeyType(t, test.kt, test.indexedProperties)
|
||||
|
||||
store2 := NewSQLServerStore()
|
||||
store2 := NewSQLServerStateStore()
|
||||
assert.Nil(t, store2.Init(createMetadata(store.schema, test.kt, test.indexedProperties)))
|
||||
})
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ func TestValidConfiguration(t *testing.T) {
|
|||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
sqlStore := NewSQLServerStore()
|
||||
sqlStore := NewSQLServerStateStore()
|
||||
sqlStore.migratorFactory = func(s *SQLServer) migrator {
|
||||
return &mockMigrator{}
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ func TestInvalidConfiguration(t *testing.T) {
|
|||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
sqlStore := NewSQLServerStore()
|
||||
sqlStore := NewSQLServerStateStore()
|
||||
|
||||
metadata := state.Metadata{
|
||||
Properties: tt.props,
|
||||
|
|
Loading…
Reference in New Issue