Skip to content

TriggersAnnotationIT is failing on windows #3477

@rohanKanojia

Description

@rohanKanojia
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

Activity

pujakarakoti07

pujakarakoti07 commented on Oct 21, 2024

@pujakarakoti07
Contributor

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

rohanKanojia

rohanKanojia commented on Oct 21, 2024

@rohanKanojia
MemberAuthor

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

linked a pull request that will close this issue on Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @rohanKanojia@pujakarakoti07

      Issue actions

        TriggersAnnotationIT is failing on windows · Issue #3477 · eclipse-jkube/jkube