-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Expand contract tests to support persistent data stores #199
Conversation
aae906f
to
39b39bd
Compare
02ebdc5
to
fa709be
Compare
a3215f0
to
2bf606d
Compare
dynamodb: | ||
image: amazon/dynamodb-local | ||
ports: | ||
- 8000:8000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda surprised they "took" port 8000 for dynamodb.
awsconfig.WithRegion("us-east-1"), | ||
awsconfig.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("dummy", "dummy", "dummy")), | ||
) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function that calls makeSDKConfig
is capable of returning an error, so it would be good to change the signature here so we can bubble this back up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
testservice/sdk_client_entity.go
Outdated
} | ||
|
||
builder = ldcomponents.PersistentDataStore(dsBuilder) | ||
default: // TODO: We should probably fail here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also return an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -246,7 +249,7 @@ func main() { | |||
loggers := ldlog.NewDefaultLoggers() | |||
loggers.SetMinLevel(logLevelFromName(os.Getenv("LD_LOG_LEVEL"))) | |||
|
|||
port := "8000" | |||
port := "10000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was changing the dynamo port a no-go, rather than changing the test service's port?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could have changed the dynamodb port. But since every other SDK is going to have to override it (and then each of us will when doing local work), I thought it might be better to try and get those ports on the standard ones, and then maybe we can align on an SDK test harness port.
CapabilityClientPrereqEvents = "client-prereq-events" | ||
CapabilityPersistentDataStoreRedis = "persistent-data-store-redis" | ||
CapabilityPersistentDataStoreConsul = "persistent-data-store-consul" | ||
CapabilityPersistentDataStoreDynamoDB = "persistent-data-store-dynamodb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR: I think we really don't need constants for these things.
Awesome work! |
No description provided.