Skip to content
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

TriggersAnnotationIT is failing on windows #3477

Open
1 task
rohanKanojia opened this issue Oct 20, 2024 · 2 comments · May be fixed by #3481
Open
1 task

TriggersAnnotationIT is failing on windows #3477

rohanKanojia opened this issue Oct 20, 2024 · 2 comments · May be fixed by #3481
Labels
help wanted Extra attention is needed

Comments

@rohanKanojia
Copy link
Member

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:

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 #3014

Problem seems to be here :

Jackson generates annotation with platform specific line delimiters /r/n for windows.

If we change it like this, it makes test pass:

-            return Serialization.asJson(triggerList);
+            return Serialization.asJson(triggerList).replaceAll("\r?\n", "\n");

Expected Behavior

TriggersAnnotationIT should pass on windows

Acceptance Criteria

  • TriggersAnnotationIT should pass on windows and Linux
@rohanKanojia rohanKanojia added good first issue Good for newcomers help wanted Extra attention is needed and removed good first issue Good for newcomers labels Oct 20, 2024
@pujakarakoti07
Copy link
Contributor

pujakarakoti07 commented Oct 21, 2024

@rohanKanojia I want to work on this issue, can you please assign this to me?

@rohanKanojia
Copy link
Member Author

@pujakarakoti07 : Could you please reply to my comments on your open pull requests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants