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

Fix "should succeed with the kubevirt cluster being deleted" unit test #259

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

nunnatsa
Copy link
Contributor

@nunnatsa nunnatsa commented Aug 21, 2023

What this PR does / why we need it

This unit test is broken. This PR fixes it by populating the KubevirtClusterReconciler.APIReader field in unit-test, for mocking.

In addition, this PR also fixes the hack/kccm-flavor-gen.sh script so it will
replace the hard coded names with the right variables.

Which issue this PR fixes

fixes #258

Release notes:

None

this unit test is broken. This PR fixes it by populating the
`KubevirtClusterReconciler.APIReader` field in unit-test, for mocking.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 21, 2023
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 21, 2023
`make generate-kccm-flavors` generates wrong manifests, setting a
constant names where we should use variables.

This commit fixes the `hack/kccm-flavor-gen.sh` script so it will
replace the hard coded names with the right variables.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
@nunnatsa
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Aug 21, 2023


sed -i \
-E "s|(namespace: )kvcluster|\1\${NAMESPACE}|g;s|(^.*cluster-name=)kvcluster|\1\${CLUSTER_NAME}|g" \
Copy link
Contributor

Choose a reason for hiding this comment

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

@qinqon
Copy link
Contributor

qinqon commented Aug 21, 2023

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 21, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nunnatsa, qinqon

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

@k8s-ci-robot k8s-ci-robot merged commit a7dfcad into kubernetes-sigs:main Aug 21, 2023
9 checks passed
@nunnatsa nunnatsa deleted the fix-258 branch August 21, 2023 07:40
@agradouski
Copy link
Contributor

/lgtm
thanks for fixing @nunnatsa

@nunnatsa nunnatsa restored the fix-258 branch August 29, 2023 14:32
@nunnatsa nunnatsa deleted the fix-258 branch August 29, 2023 14:32
@nunnatsa nunnatsa restored the fix-258 branch August 29, 2023 14:32
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit-Test is broken
4 participants