-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
refactor: rename valtest_test and testutils_test imports #5343
Conversation
Rename the usages of the testutils and valtest utilities from testutils_test to testutils and valtest_test to valtest.
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: stormqueen1990 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 |
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
@stormqueen1990: Closed this PR. In response to this:
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. |
Rename the usages of the
testutils
andvaltest
utilities fromtestutils_test
totestutils
andvaltest_test
tovaltest
.There are at least two other packages I found that are being used with a similar naming pattern:
kusttest
andresmaptest
.This is based on feedback given in #5315 (comment)
/hold for discussion and until #5315 is merged