Skip to content

Fix 'Unable to retrieve current OCP version: Malformed version' when running unit tests#729

Merged
jgwest merged 2 commits into
redhat-developer:masterfrom
jgwest:fix-GITOPS-3966-june-2024
Jun 18, 2024
Merged

Fix 'Unable to retrieve current OCP version: Malformed version' when running unit tests#729
jgwest merged 2 commits into
redhat-developer:masterfrom
jgwest:fix-GITOPS-3966-june-2024

Conversation

@jgwest

@jgwest jgwest commented Jun 6, 2024

Copy link
Copy Markdown
Member

What type of PR is this?
/kind failing-test

What does this PR do / why we need it:

  • This PR fixes the following error, when running the unit tests locally:
2024/01/24 09:40:13 Unable to retrieve current OCP version: Malformed version:
FAIL 
coverage: 69.8% of statements
FAIL github.com/redhat-developer/gitops-operator/controllers 0.088s
ok github.com/redhat-developer/gitops-operator/controllers/argocd 0.022s coverage: 92.9% of statements
ok github.com/redhat-developer/gitops-operator/controllers/argocd/openshift 0.015s coverage: 69.6% of statements
? github.com/redhat-developer/gitops-operator/version [no test files]
ok github.com/redhat-developer/gitops-operator/controllers/util 0.012s coverage: 16.7% of statements
FAIL
make: *** [Makefile:113: test] Error 1
Error: Process completed with exit code 2.

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

…running unit tests

Signed-off-by: Jonathan West <jonwest@redhat.com>
@openshift-ci openshift-ci Bot added the kind/failing-test Categorizes issue or PR as related to a frequently failing test. label Jun 6, 2024
@jgwest

jgwest commented Jun 6, 2024

Copy link
Copy Markdown
Member Author

Red Hat JIRA #: https://issues.redhat.com/browse/GITOPS-3966

@openshift-ci openshift-ci Bot requested review from iam-veeramalla and jannfis June 6, 2024 09:31
@openshift-ci

openshift-ci Bot commented Jun 6, 2024

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from jgwest. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jgwest

jgwest commented Jun 7, 2024

Copy link
Copy Markdown
Member Author

/retest

…running unit tests

Signed-off-by: Jonathan West <jonwest@redhat.com>
@jgwest

jgwest commented Jun 10, 2024

Copy link
Copy Markdown
Member Author

/retest

@chetan-rns chetan-rns left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@chetan-rns

Copy link
Copy Markdown
Member

I think passing the namespace via an environment variable would be a better approach than reading it from a file. We can revisit this in a different PR.

@jgwest

jgwest commented Jun 18, 2024

Copy link
Copy Markdown
Member Author

Thanks @chetan-rns!

@jgwest jgwest merged commit b134408 into redhat-developer:master Jun 18, 2024
trdoyle81 pushed a commit to trdoyle81/gitops-operator that referenced this pull request Aug 13, 2024
…running unit tests (redhat-developer#729)

* Fix 'Unable to retrieve current OCP version: Malformed version' when running unit tests

Signed-off-by: Jonathan West <jonwest@redhat.com>

* Fix 'Unable to retrieve current OCP version: Malformed version' when running unit tests

Signed-off-by: Jonathan West <jonwest@redhat.com>

---------

Signed-off-by: Jonathan West <jonwest@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/failing-test Categorizes issue or PR as related to a frequently failing test. lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants