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

make the testjob source dir configurable #367

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

bmeng
Copy link
Contributor

@bmeng bmeng commented Mar 12, 2024

What type of PR is this?

feature

What this PR does / Why we need it?

Currently, we have the ocm backplane testjob command to test the script with custom image, but it has to be run under the script dir
Add the new parameter to specify the source dir for the script

Which Jira/Github issue(s) does this PR fix?

Resolves #

Special notes for your reviewer

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 12, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 48.19%. Comparing base (5e67ca1) to head (b0a1b78).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #367      +/-   ##
==========================================
+ Coverage   47.98%   48.19%   +0.20%     
==========================================
  Files          56       56              
  Lines        4272     4293      +21     
==========================================
+ Hits         2050     2069      +19     
- Misses       1900     1901       +1     
- Partials      322      323       +1     
Files Coverage Δ
cmd/ocm-backplane/testJob/createTestJob.go 73.44% <92.85%> (+2.29%) ⬆️

@bmeng
Copy link
Contributor Author

bmeng commented Mar 12, 2024

/retest

2 similar comments
@bmeng
Copy link
Contributor Author

bmeng commented Mar 12, 2024

/retest

@bmeng
Copy link
Contributor Author

bmeng commented Mar 13, 2024

/retest

Copy link
Contributor

@hectorakemp hectorakemp left a comment

Choose a reason for hiding this comment

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

Great work @bmeng !
I think only one change is needed for an lgtm from me. We need a test for the negative case of when the specified source dir doesn't exist on the file system. Then it's lgtm!

Copy link
Contributor

openshift-ci bot commented Mar 26, 2024

@bmeng: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@bmeng
Copy link
Contributor Author

bmeng commented Mar 26, 2024

@hectorakemp thanks for review.
Have added a new function checkDirectory() to ensure the given directory is valid. And related test added.

Copy link
Contributor

@hectorakemp hectorakemp left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2024
Copy link
Contributor

openshift-ci bot commented Mar 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bmeng, hectorakemp

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

@openshift-merge-bot openshift-merge-bot bot merged commit 125a4cc into openshift:main Mar 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants