-
Notifications
You must be signed in to change notification settings - Fork 551
Closed
Description
Component
None
Task description
Description
Related to #3406
FileSecretIT is failing on windows:
Error: FileSecretIT.k8sResource_whenRun_generatesK8sSecret:35 � IllegalArgument Values not equal for entry: 'application.properties', expected 'a2V5MSA9IHZhbHVlMQprZXkyID0gdmFsdWUyCmtleTMgPSB2YWx1ZTM=' but was 'a2V5MSA9IHZhbHVlMQ0Ka2V5MiA9IHZhbHVlMg0Ka2V5MyA9IHZhbHVlMw=='
Error: FileSecretIT.ocResource_whenRun_generatesK8sSecret:48 � IllegalArgument Values not equal for entry: 'application.properties', expected 'a2V5MSA9IHZhbHVlMQprZXkyID0gdmFsdWUyCmtleTMgPSB2YWx1ZTM=' but was 'a2V5MSA9IHZhbHVlMQ0Ka2V5MiA9IHZhbHVlMg0Ka2V5MyA9IHZhbHVlMw=='
This issue looks related to one issue I had fixed #3014
Problem seems to be here :
Lines 87 to 89 in 78e8631
private byte[] readContent(String location) throws IOException { | |
return Files.readAllBytes(Paths.get(location)); | |
} |
Jackson generates annotation with platform specific line delimiters /r/n
for windows.
If we change it like this, it makes test pass:
- return Files.readAllBytes(Paths.get(location));
+ String data = new String(Files.readAllBytes(Paths.get(location)));
+ data = data.replaceAll("\r?\n", "\n");
+ return data.getBytes();
Expected Behavior
FileSecretIT should pass on windows
Acceptance Criteria
- FileSecretIT should pass on windows and Linux
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed