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

Rename CreateClient to CreateKubeClient #2432

Merged
merged 3 commits into from Dec 6, 2018

Conversation

Projects
None yet
3 participants
@agentgonzo
Copy link
Member

agentgonzo commented Dec 6, 2018

Method name was confusingly vague

Submitter checklist

  • Change is code complete and matches issue description.
  • Change is covered by existing or new tests.

Description

Special notes for the reviewer(s)

Which issue this PR fixes

fixes #

@jenkins-x-bot jenkins-x-bot requested review from amuniz and pmuir Dec 6, 2018

@jenkins-x-bot jenkins-x-bot added the size/M label Dec 6, 2018

@@ -155,7 +155,7 @@ func TestCreateEnvironmentSurvey(t *testing.T) {

// mock Kubernetes interface
kubernetesInterface := kube_mocks.NewSimpleClientset(namespace)
// Override CreateClient to return mock Kubernetes interface
// Override CreateKubeClient to return mock Kubernetes interface
When(factory.CreateClient()).ThenReturn(kubernetesInterface, "jx-testing", nil)

This comment has been minimized.

@jtnord

jtnord Dec 6, 2018

Member

shouldn;t the mock have changed too

This comment has been minimized.

@agentgonzo
@@ -99,7 +99,7 @@ func TestStatusRun(t *testing.T) {
factory := cmd_mocks.NewMockFactory()
// mock Kubernetes interface
kubernetesInterface := kube_mocks.NewSimpleClientset(node, deployment, service)
// Override CreateClient to return mock Kubernetes interface
// Override CreateKubeClient to return mock Kubernetes interface
When(factory.CreateClient()).ThenReturn(kubernetesInterface, "jx-testing", nil)

This comment has been minimized.

@jtnord

jtnord Dec 6, 2018

Member

shouldn't the mock have changed too?

This comment has been minimized.

@agentgonzo

This comment has been minimized.

@agentgonzo

agentgonzo Dec 6, 2018

Member

which is probably why the tests failed

agentgonzo added some commits Dec 6, 2018

chore(quality): Renamed CreateClient to CreateKubeClient
We have a variety of CreateXyzClient methods in the factory. Having one
called CreateClient was confusingly vague

@agentgonzo agentgonzo force-pushed the agentgonzo:renameGetCLient branch from 5671586 to ad894fb Dec 6, 2018

@agentgonzo

This comment has been minimized.

Copy link
Member

agentgonzo commented Dec 6, 2018

@jtnord - this should be fixed now

@jtnord
Copy link
Member

jtnord left a comment

/lgtm

@jenkins-x-bot jenkins-x-bot added the lgtm label Dec 6, 2018

@jenkins-x-bot

This comment has been minimized.

Copy link
Contributor

jenkins-x-bot commented Dec 6, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jtnord

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@jenkins-x-bot jenkins-x-bot merged commit c1cb828 into jenkins-x:master Dec 6, 2018

2 checks passed

serverless-jenkins succeeded
tide In merge pool.
Details

@agentgonzo agentgonzo deleted the agentgonzo:renameGetCLient branch Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment