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

Detect and use oc / kubectl for integration tests #53

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Oct 9, 2023

Please specify the area for this PR

What does does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes devfile/api#1239

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?
  • Gosec scans

Documentation

  • Does the registry operator documentation need to be updated with your changes?

How to test changes / Special notes to the reviewer:

  • Run make test-integration with oc only, kubectl only, none of them present in the PATH.
  • Define K8S_CLI with the preferred cli to use

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

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

Also, could you update this line in the README.md file accordingly?
https://github.com/feloy/registry-operator/blob/feature-1239/test-with-kubectl/README.md?plain=1#L99

tests/integration/pkg/client/client.go Outdated Show resolved Hide resolved
@feloy feloy requested a review from rm3l October 11, 2023 12:59
Signed-off-by: Philippe Martin <phmartin@redhat.com>
Signed-off-by: Philippe Martin <phmartin@redhat.com>
@feloy feloy force-pushed the feature-1239/test-with-kubectl branch from aea0872 to cd1ccac Compare October 11, 2023 13:01
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (b06b836) 25.86% compared to head (1f1015b) 25.86%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #53   +/-   ##
=======================================
  Coverage   25.86%   25.86%           
=======================================
  Files          25       25           
  Lines        1415     1415           
=======================================
  Hits          366      366           
  Misses       1026     1026           
  Partials       23       23           

see 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

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

LGTM. Could you just update this line in the README.md file accordingly (especially to mention the use of the env var)?
https://github.com/feloy/registry-operator/blob/feature-1239/test-with-kubectl/README.md?plain=1#L99

@feloy feloy requested a review from rm3l October 12, 2023 08:43
Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

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

LGTM. Fixing the DCO checks and it should be good.

@openshift-ci openshift-ci bot added the lgtm label Oct 12, 2023
Signed-off-by: Philippe Martin <phmartin@redhat.com>
@feloy feloy force-pushed the feature-1239/test-with-kubectl branch from d2cb83a to 1f1015b Compare October 12, 2023 11:53
@openshift-ci openshift-ci bot removed the lgtm label Oct 12, 2023
@openshift-ci openshift-ci bot added the lgtm label Oct 12, 2023
@openshift-ci
Copy link

openshift-ci bot commented Oct 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feloy, rm3l

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

The pull request process is described here

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

@feloy feloy merged commit 3801183 into devfile:main Oct 12, 2023
9 checks passed
thepetk pushed a commit to thepetk/devfile-registry-operator that referenced this pull request Aug 20, 2024
* Detect and use oc / kubectl for integration tests

Signed-off-by: Philippe Martin <phmartin@redhat.com>

* Use K8S_CLI first, then look in path instead of running version command

Signed-off-by: Philippe Martin <phmartin@redhat.com>

* Document

Signed-off-by: Philippe Martin <phmartin@redhat.com>

---------

Signed-off-by: Philippe Martin <phmartin@redhat.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants