-
Notifications
You must be signed in to change notification settings - Fork 17
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
Cbc UI d2 4454 cloud encryption operator #1175
base: main
Are you sure you want to change the base?
Conversation
…hat's going on with auth
…into cbc-UID2-4454-cloud-encryption-operator
|
||
@Override | ||
public long getVersion(JsonObject metadata) { | ||
return Instant.now().getEpochSecond(); |
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.
why isn't it metadata.getLong("version") ?
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.
Because this is using an API to get the data not a file, so there is no metadata to look the version up in. So I just used the time here to force a refresh everytime
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 probably needs a comment explaining why you are doing this as I feel we will forget
public class RotatingCloudEncryptionKeyApiProvider extends RotatingCloudEncryptionKeyProvider { | ||
private static final Logger LOGGER = LoggerFactory.getLogger(RotatingCloudEncryptionKeyApiProvider.class); | ||
|
||
public ApiStoreReader<Map<Integer, CloudEncryptionKey>> apiStoreReader; |
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.
does this need to be public?
@@ -0,0 +1,73 @@ | |||
[ { |
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.
Indentation format like this: https://github.com/IABTechLab/uid2-admin/blob/main/src/main/resources/localstack/s3/core/keys/keys.json?
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.
Small comments.
|
||
@Override | ||
public long getVersion(JsonObject metadata) { | ||
return Instant.now().getEpochSecond(); |
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 probably needs a comment explaining why you are doing this as I feel we will forget
.put(dataType, new JsonArray().add("value1").add("value2")); | ||
|
||
List<TestData> expectedData = Arrays.asList(new TestData("value1"), new TestData("value2")); | ||
when(mockParser.deserialize(any(InputStream.class))) |
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 test doesn't actually test if the input "contents" are used to return the result. It is only testing that loadContent will store the results of the parser.deserialize in the snapshot. I could change the contents array to have 3 values and the test would still pass.
You should validate properties of the any(InputStream.class) parameter.
No description provided.