Skip to content

ConfigMapIT is failing on windows #3479

@rohanKanojia

Description

@rohanKanojia

Component

None

Task description

Description

Related to #3406

⚠️ A windows machine is required to reproduce and fix problems in this issue

ConfigMapIT is failing on windows with this error message:

Error:  Errors: 
Error:    ConfigMapIT.k8sResource_whenRun_generatesK8sManifestsContainingConfigMap:37 � IllegalArgument Values not equal for entry: 'application.properties', expected 'environment = test
foo = bar' but was 'environment = test
foo = bar'
Error:    ConfigMapIT.ocResource_whenRun_generatesOpenShiftManifestsContainingConfigMap:56 � IllegalArgument Values not equal for entry: 'application.properties', expected 'environment = test
foo = bar' but was 'environment = test
foo = bar'

This issue looks related to one issue I had fixed #3014

This issue looks similar to #3477 and #3478 but the code responsible for adding ConfigMap entries from file resides in fabric8 Kubernetes Client. Not sure whether to add handling for windows line breaks there or to add it in ConfigMapEnricher.

I think we need to debug here :

Path filePath = Paths.get(entry.getValue());
addEntriesFromDirOrFileToConfigMap(configMapBuilder, getOutput(key), filePath);
it.remove();
}

When I checked it I saw that configmap entries contain windows specific line breaks
Screenshot 2024-10-20 202300

Expected Behavior

ConfigMapIT passes on windows and Linux

Acceptance Criteria

  • ConfigMapIT should pass on windows and Linux

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

    No branches or pull requests

    Issue actions