Skip to content

Commit

Permalink
Remove unused variables (only assigned to) from test code.
Browse files Browse the repository at this point in the history
This is revealed by the go/types package, which is stricter than
the Go compiler about unused variables. See also: golang/go#8560

Kubernetes-commit: e04b91facf180c17557a44e8e462858ea2936301
  • Loading branch information
Ryan Hitchman authored and k8s-publishing-bot committed Feb 2, 2018
1 parent 7f92df4 commit 3940efa
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/server/config_test.go
Expand Up @@ -45,9 +45,7 @@ func TestNewWithDelegate(t *testing.T) {
t.Fatal("unable to create fake client set")
}

delegateHealthzCalled := false
delegateConfig.HealthzChecks = append(delegateConfig.HealthzChecks, healthz.NamedCheck("delegate-health", func(r *http.Request) error {
delegateHealthzCalled = true
return fmt.Errorf("delegate failed healthcheck")
}))

Expand All @@ -74,9 +72,7 @@ func TestNewWithDelegate(t *testing.T) {
wrappingConfig.LoopbackClientConfig = &rest.Config{}
wrappingConfig.SwaggerConfig = DefaultSwaggerConfig()

wrappingHealthzCalled := false
wrappingConfig.HealthzChecks = append(wrappingConfig.HealthzChecks, healthz.NamedCheck("wrapping-health", func(r *http.Request) error {
wrappingHealthzCalled = true
return fmt.Errorf("wrapping failed healthcheck")
}))

Expand Down

0 comments on commit 3940efa

Please sign in to comment.