diff --git a/sdktests/server_side_persistence_base.go b/sdktests/server_side_persistence_base.go index 3a51224..aaf989e 100644 --- a/sdktests/server_side_persistence_base.go +++ b/sdktests/server_side_persistence_base.go @@ -21,7 +21,7 @@ import ( ) const ( - PersistenceInitedKey = "$inited" + persistenceInitedKey = "$inited" ) func doServerSidePersistentTests(t *ldtest.T) { diff --git a/sdktests/server_side_persistence_dynamodb.go b/sdktests/server_side_persistence_dynamodb.go index 0e32b15..c7fe762 100644 --- a/sdktests/server_side_persistence_dynamodb.go +++ b/sdktests/server_side_persistence_dynamodb.go @@ -85,7 +85,7 @@ func (d *DynamoDBPersistentStore) Get(prefix, key string) (o.Maybe[string], erro return o.None[string](), err } else if result.Item == nil { return o.None[string](), nil - } else if key == PersistenceInitedKey { + } else if key == persistenceInitedKey { return o.Some(""), nil } @@ -176,7 +176,7 @@ func (d *DynamoDBPersistentStore) WriteMap(prefix, key string, data map[string]s } for k := range unusedKeys { - if k == PersistenceInitedKey { + if k == persistenceInitedKey { continue } delKey := map[string]*dynamodb.AttributeValue{ @@ -191,8 +191,8 @@ func (d *DynamoDBPersistentStore) WriteMap(prefix, key string, data map[string]s // Now set the special key that we check in InitializedInternal() requests = append(requests, &dynamodb.WriteRequest{ PutRequest: &dynamodb.PutRequest{Item: map[string]*dynamodb.AttributeValue{ - dynamoDbTablePartitionKey: {S: aws.String(addPrefix(prefix, PersistenceInitedKey))}, - dynamoDbTableSortKey: {S: aws.String(PersistenceInitedKey)}, + dynamoDbTablePartitionKey: {S: aws.String(addPrefix(prefix, persistenceInitedKey))}, + dynamoDbTableSortKey: {S: aws.String(persistenceInitedKey)}, }}, }) diff --git a/sdktests/server_side_persistence_read_write.go b/sdktests/server_side_persistence_read_write.go index 8a24d8c..efa053e 100644 --- a/sdktests/server_side_persistence_read_write.go +++ b/sdktests/server_side_persistence_read_write.go @@ -63,7 +63,7 @@ func (s *ServerSidePersistentTests) initializesStoreWhenDataReceived(t *ldtest.T _, configurers := s.setupDataSources(t, sdkData) configurers = append(configurers, persistence) - value, _ := s.persistentStore.Get(s.defaultPrefix, PersistenceInitedKey) + value, _ := s.persistentStore.Get(s.defaultPrefix, persistenceInitedKey) require.False(t, value.IsDefined()) // should not exist _ = NewSDKClient(t, s.baseSDKConfigurationPlus(configurers...)...) @@ -86,7 +86,7 @@ func (s *ServerSidePersistentTests) appliesUpdatesToStore(t *ldtest.T) { stream, configurers := s.setupDataSources(t, sdkData) configurers = append(configurers, persistence) - value, _ := s.persistentStore.Get(s.defaultPrefix, PersistenceInitedKey) + value, _ := s.persistentStore.Get(s.defaultPrefix, persistenceInitedKey) require.False(t, value.IsDefined()) // should not exist _ = NewSDKClient(t, s.baseSDKConfigurationPlus(configurers...)...) @@ -346,9 +346,9 @@ func (s *ServerSidePersistentTests) sdkReflectsDataSourceUpdatesEvenWithCache( //nolint:unparam func (s *ServerSidePersistentTests) eventuallyRequireDataStoreInit(t *ldtest.T, prefix string) { h.RequireEventually(t, func() bool { - value, _ := s.persistentStore.Get(prefix, PersistenceInitedKey) + value, _ := s.persistentStore.Get(prefix, persistenceInitedKey) return value.IsDefined() - }, time.Second, time.Millisecond*20, PersistenceInitedKey+" key was not set") + }, time.Second, time.Millisecond*20, persistenceInitedKey+" key was not set") } func (s *ServerSidePersistentTests) eventuallyValidateFlagData(