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

Updating unit tests so that they pass with v1beta3 api #5838

Merged
merged 1 commit into from
Mar 25, 2015

Conversation

nikhiljindal
Copy link
Contributor

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.

@googlebot
Copy link

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.

@derekwaynecarr
Copy link
Member

Is the plan to still only support a single testAPI.Version on a single run of tests?

@nikhiljindal
Copy link
Contributor Author

We want to run tests twice once for each version (#1473), atleast when run locally.
On travis, we might pick a version at random.

// 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 {
Copy link
Member

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.

Copy link
Contributor

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.

@bgrant0607
Copy link
Member

There's concern about the time required to run all tests with both API versions on Travis/Shippable.

LGTM.

@bgrant0607 bgrant0607 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 25, 2015
bgrant0607 added a commit that referenced this pull request Mar 25, 2015
Updating unit tests so that they pass with v1beta3 api
@bgrant0607 bgrant0607 merged commit d75291d into kubernetes:master Mar 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants