Skip to content

Commit

Permalink
mock: generation is an Integer field
Browse files Browse the repository at this point in the history
  • Loading branch information
petitlapin committed Mar 5, 2022
1 parent 8e453ab commit ee1a7e9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ private void setDefaultMetadata(JsonNode source, Map<String, String> pathValues,
metadata.put("namespace", pathValues.get(KubernetesAttributesExtractor.NAMESPACE));
}
metadata.put("uid", getOrDefault(existingMetadata, "uid", uuid.toString()));
metadata.put(GENERATION, getOrDefault(existingMetadata, GENERATION, "1"));
metadata.put(GENERATION, Integer.parseInt(getOrDefault(existingMetadata, GENERATION, "1")));
metadata.put("creationTimestamp", getOrDefault(existingMetadata, "creationTimestamp", ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT)));

if (existing == null) {
Expand Down

0 comments on commit ee1a7e9

Please sign in to comment.