Adding GetBulkSecret API.#452
Conversation
|
This PR depends on dapr/components-contrib#632. Which means that DAPR_REF will need to be updated after the fix is in dapr/dapr. |
mukundansundar
left a comment
There was a problem hiding this comment.
lgtm. can be merged after the componenets contrib change and dapr ref change.
| @@ -1927,6 +1928,74 @@ public void getSecretsWithMetadata() { | |||
| assertEquals(expectedValue, result.get(expectedKey)); | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
I had created a test for nullable etag, if you'd like to include it:
| @Test | |
| public void saveStateTestNullEtag() { | |
| String key = "key1"; | |
| String etag = null; | |
| String value = "State value"; | |
| ArgumentCaptor<DaprProtos.SaveStateRequest> argument = ArgumentCaptor.forClass(DaprProtos.SaveStateRequest.class); | |
| doAnswer((Answer<Void>) invocation -> { | |
| StreamObserver<Empty> observer = (StreamObserver<Empty>) invocation.getArguments()[1]; | |
| observer.onNext(Empty.getDefaultInstance()); | |
| observer.onCompleted(); | |
| return null; | |
| }).when(daprStub).saveState(argument.capture(), any()); | |
| StateOptions options = buildStateOptions(StateOptions.Consistency.STRONG, StateOptions.Concurrency.FIRST_WRITE); | |
| Mono<Void> result = client.saveState(STATE_STORE_NAME, key, etag, value, options); | |
| result.block(); | |
| assertFalse(argument.getValue().getStates(0).hasEtag()); | |
| } | |
There was a problem hiding this comment.
Actually, why don't I just create a separate PR with the tests, cause I wrote one for deleteState as well.
Codecov Report
@@ Coverage Diff @@
## master #452 +/- ##
============================================
- Coverage 83.09% 82.73% -0.36%
- Complexity 904 929 +25
============================================
Files 77 79 +2
Lines 2644 2717 +73
Branches 264 269 +5
============================================
+ Hits 2197 2248 +51
- Misses 318 334 +16
- Partials 129 135 +6
Continue to review full report at Codecov.
|
Description
Please explain the changes you've made
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #421
Also includes #442
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: