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

refactor: rename valtest_test and testutils_test imports #5343

Conversation

stormqueen1990
Copy link
Member

@stormqueen1990 stormqueen1990 commented Sep 24, 2023

Rename the usages of the testutils and valtest utilities from testutils_test to testutils and valtest_test to valtest.

There are at least two other packages I found that are being used with a similar naming pattern: kusttest and resmaptest.

This is based on feedback given in #5315 (comment)

/hold for discussion and until #5315 is merged

Rename the usages of the testutils and valtest utilities from testutils_test to
testutils and valtest_test to valtest.
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 24, 2023
@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 24, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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 added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 24, 2023
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 29, 2023
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

@@ -11,7 +11,7 @@ import (
. "sigs.k8s.io/kustomize/api/internal/generators"
"sigs.k8s.io/kustomize/api/kv"
"sigs.k8s.io/kustomize/api/loader"
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
valtest "sigs.k8s.io/kustomize/api/testutils/valtest"
Copy link
Contributor

@natasha41575 natasha41575 Sep 29, 2023

Choose a reason for hiding this comment

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

So if you go to the package where these test helpers are defined, the name of the package is actually valtest_test. I think this is pretty standard for test packages (so that it gets compiled separately from the main package).

I'm not really sure it matters whether we name the import valtest or valtest_test - kind of seems like we are trying to decide between using the package name or the directory name. To me using the actual package name valtest_test seems to make more sense.

I think what does matter is that we choose one pattern and stick to it, so I'd be inclined to leave it as valtest_test since that seems to have been the convention so far. Again I really don't think it matters too much so I could be convinced otherwise if someone feels there is a strong reason to change it.

Copy link
Member Author

Choose a reason for hiding this comment

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

This makes sense to me. I'll close this for the time being, as I mainly opened so we could discuss.

/close

@k8s-ci-robot
Copy link
Contributor

@stormqueen1990: Closed this PR.

In response to this:

This makes sense to me. I'll close this for the time being, as I mainly opened so we could discuss.

/close

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.

@stormqueen1990 stormqueen1990 deleted the refactor/rename-imports branch October 1, 2023 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Development

Successfully merging this pull request may close these issues.

None yet

3 participants