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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pkg/backends/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (

v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/kubernetes/pkg/cloudprovider/providers/gce"
"k8s.io/kubernetes/pkg/cloudprovider/providers/gce/cloud/meta"

"k8s.io/ingress-gce/pkg/healthchecks"
Expand Down Expand Up @@ -74,7 +75,7 @@ const maxRPS = 1

// Backends implements BackendPool.
type Backends struct {
cloud BackendServices
cloud *gce.GCECloud
negGetter NEGGetter
nodePool instances.NodePool
healthChecker healthchecks.HealthChecker
Expand All @@ -94,7 +95,7 @@ var _ BackendPool = (*Backends)(nil)
// - ignorePorts: is a set of ports to avoid syncing/GCing.
// - resyncWithCloud: if true, periodically syncs with cloud resources.
func NewBackendPool(
cloud BackendServices,
cloud *gce.GCECloud,
negGetter NEGGetter,
healthChecker healthchecks.HealthChecker,
nodePool instances.NodePool,
Expand Down
Loading