Skip to content

Commit

Permalink
Doesn't need to be exported
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 committed Oct 24, 2024
1 parent a72f690 commit 2866108
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sdktests/server_side_persistence_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

const (
PersistenceInitedKey = "$inited"
persistenceInitedKey = "$inited"
)

func doServerSidePersistentTests(t *ldtest.T) {
Expand Down
8 changes: 4 additions & 4 deletions sdktests/server_side_persistence_dynamodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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{
Expand All @@ -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)},
}},
})

Expand Down
8 changes: 4 additions & 4 deletions sdktests/server_side_persistence_read_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)...)
Expand All @@ -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...)...)
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 2866108

Please sign in to comment.