-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Updating unit tests so that they pass with v1beta3 api #5838
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/. If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits. Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name. |
5fa7868
to
7e3b7f9
Compare
Is the plan to still only support a single testAPI.Version on a single run of tests? |
We want to run tests twice once for each version (#1473), atleast when run locally. |
// For ex, this is of the form: | ||
// /api/v1beta1/pods/pod0 for v1beta1 and | ||
// /api/v1beta3/namespaces/foo/pods/pod0 for v1beta3. | ||
func ResourcePath(resource, namespace, name string) string { |
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.
I'm surprised these helpers didn't already exist in the client library itself.
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.
Trying to discourage direct path behavior, really
On Mar 24, 2015, at 8:18 PM, Brian Grant notifications@github.com wrote:
In pkg/api/testapi/testapi.go:
@@ -74,3 +75,34 @@ func SelfLink(resource, name string) string {
}
return fmt.Sprintf("/api/%s/%s/%s", Version(), resource, name)
}
+
+// Returns the appropriate path for the given resource, namespace and name.
+// For ex, this is of the form:
+// /api/v1beta1/pods/pod0 for v1beta1 and
+// /api/v1beta3/namespaces/foo/pods/pod0 for v1beta3.
+func ResourcePath(resource, namespace, name string) string {
I'm surprised these helpers didn't already exist in the client library itself.—
Reply to this email directly or view it on GitHub.
There's concern about the time required to run all tests with both API versions on Travis/Shippable. LGTM. |
Updating unit tests so that they pass with v1beta3 api
Required for #1473 and #5475
This PR fixes all unit tests except pkg/client, which I am still working on. Will fix that in the next PR.