Open rohanKanojia opened 3 weeks ago
None
Related to #3406
⚠️ A windows machine is required to reproduce and fix problems in this issue
TriggersAnnotationIT is failing on windows:
Error: TriggersAnnotationIT.ocResourceTask_whenRun_generatesOpenShiftManifestWithTriggersAnnotation:53 � IllegalArgument Values not equal for entry: 'image.openshift.io/triggers', expected '[ { "from" : { "kind" : "ImageStreamTag", "name" : "triggersannotation:latest" }, "fieldPath" : "spec.template.spec.containers[?(@.name==\"orgeclipsejkubeintegrationtestsgradle-triggersannotation\")].image" } ]' but was '[ { "from" : { "kind" : "ImageStreamTag", "name" : "triggersannotation:latest" }, "fieldPath" : "spec.template.spec.containers[?(@.name==\"orgeclipsejkubeintegrationtestsgradle-triggersannotation\")].image" } ]'
This issue looks related to one issue I had fixed https://github.com/eclipse-jkube/jkube/pull/3014
Problem seems to be here : https://github.com/eclipse-jkube/jkube/blob/78e8631c9c101e52dc94f14fb97c16383396afc5/jkube-kit/enricher/generic/src/main/java/org/eclipse/jkube/enricher/generic/TriggersAnnotationEnricher.java#L156
Jackson generates annotation with platform specific line delimiters /r/n for windows.
/r/n
If we change it like this, it makes test pass:
- return Serialization.asJson(triggerList); + return Serialization.asJson(triggerList).replaceAll("\r?\n", "\n");
TriggersAnnotationIT should pass on windows
@rohanKanojia I want to work on this issue, can you please assign this to me?
@pujakarakoti07 : Could you please reply to my comments on your open pull requests?
Component
None
Task description
Description
Related to #3406
⚠️ A windows machine is required to reproduce and fix problems in this issue
TriggersAnnotationIT is failing on windows:
This issue looks related to one issue I had fixed https://github.com/eclipse-jkube/jkube/pull/3014
Problem seems to be here : https://github.com/eclipse-jkube/jkube/blob/78e8631c9c101e52dc94f14fb97c16383396afc5/jkube-kit/enricher/generic/src/main/java/org/eclipse/jkube/enricher/generic/TriggersAnnotationEnricher.java#L156
Jackson generates annotation with platform specific line delimiters
/r/n
for windows.If we change it like this, it makes test pass:
Expected Behavior
TriggersAnnotationIT should pass on windows
Acceptance Criteria