Skip to content

Commit

Permalink
fix minikube service tests
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadkatti committed Mar 5, 2020
1 parent d19f27a commit b7463fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/minikube/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,17 @@ var defaultNamespaceServiceInterface = &MockServiceInterface{
Spec: core.ServiceSpec{
Ports: []core.ServicePort{
{
Name: "port1",
NodePort: int32(1111),
Port: int32(11111),
TargetPort: intstr.IntOrString{
IntVal: int32(11111),
},
},
{
Name: "port2",
NodePort: int32(2222),
Port: int32(22222),
TargetPort: intstr.IntOrString{
IntVal: int32(22222),
},
Expand Down Expand Up @@ -324,7 +328,7 @@ func TestPrintURLsForService(t *testing.T) {
serviceName: "mock-dashboard",
namespace: "default",
tmpl: template.Must(template.New("svc-arbitrary-template").Parse("{{.Name}}={{.IP}}:{{.Port}}")),
expectedOutput: []string{"port1=127.0.0.1:1111", "port2=127.0.0.1:2222"},
expectedOutput: []string{"port1/11111=127.0.0.1:1111", "port2/22222=127.0.0.1:2222"},
},
{
description: "empty slice for no node ports",
Expand Down Expand Up @@ -452,7 +456,7 @@ func TestGetServiceURLs(t *testing.T) {
Namespace: "default",
Name: "mock-dashboard",
URLs: []string{"http://127.0.0.1:1111", "http://127.0.0.1:2222"},
PortNames: []string{"port1", "port2"},
PortNames: []string{"port1/11111", "port2/22222"},
},
{
Namespace: "default",
Expand Down

0 comments on commit b7463fd

Please sign in to comment.