-
Notifications
You must be signed in to change notification settings - Fork 89
feat: DeleteHmacKey and HmacKeyMetadata GRPC #1392
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
Conversation
BenWhitehead
left a comment
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.
A couple minor things, feel free to merge after addressing.
| final StringBuilder sb = new StringBuilder(); | ||
| sb.append(first).append(mid).append(last); | ||
| // can only contain lowercase letters | ||
| return new ProjectID(sb.toString().toLowerCase()); |
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.
We can actually push the lower case constraint back up to the arbitrary by doing
Arbitraries.chars().range('a', 'z').numeric()
This has the added benefit that the arbitrary is aware of the constraint and can therefore track and reduce against this.
I'll make a similar change to the arbitrary for BucketName in a separate PR.
| @Override | ||
| public Set<Arbitrary<?>> provideFor(TypeUsage targetType, SubtypeProvider subtypeProvider) { | ||
|
|
||
| @UpperChars Arbitrary<String> accessID = Arbitraries.strings().alpha().numeric().ofLength(61); |
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 annotation here doesn't actually effect this how we'd hope. (The annotations are useful along with the @ForAll to constrain the inputs).
To get the desired set we'd need to do something like:
Arbitrary<String> accessID = Arbitraries.strings().withCharRange('A', 'Z').numeric().ofLength(61);
|
Thanks for the update @JesseLovelace. Feel free to merge after rebasing |
First attempt at adding to GRPC, includes DeleteHmacKey operation and HmacKeyMetadata modeling + property tests.
Forgive any errors i made with property testing, i'm new here!