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

Use generated mocks to implement unit tests for pkg/backends #303

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

rramkumar1
Copy link
Contributor

@rramkumar1 rramkumar1 commented Jun 5, 2018

This PR integrates the gce generated mocks into pkg/backends.

This PR vendors k/pkg/cloudprovider/providers/gce/cloud/mock and there are two raw patches to the vendored code which will need to be upstreamed at some point:

  1. Add a new file called gce_fake.go which exposes a generic fake GCECloud object.
  2. Add new hooks functions to existing mock.go file

This change is Reviewable

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 5, 2018
@rramkumar1 rramkumar1 changed the title Use generated mocks to implement unit tests for pkg/backends [WIP] Use generated mocks to implement unit tests for pkg/backends Jun 5, 2018
@rramkumar1
Copy link
Contributor Author

/assign @nicksardo

}
}

func TestRetrieveObjectName(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move these funcs back to there original position so my PR won't conflict as much?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@nicksardo
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2018
@nicksardo nicksardo merged commit 53de1a9 into kubernetes:master Jun 5, 2018
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants