Rename SQLServer state ctor to existing pattern (#176)

This commit is contained in:
Francisco Beltrao 2020-01-07 15:17:13 +01:00 committed by Yaron Schneider
parent 70381d8312
commit db8b6135d6
3 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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)))
})
}

View File

@ -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,