Update go dependencies (#2234)
This commit is contained in:
parent
6e099c5f57
commit
93c72ef646
1236 changed files with 37226 additions and 49844 deletions
25
vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go
generated
vendored
25
vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go
generated
vendored
|
|
@ -1845,7 +1845,7 @@ func TestPodPhaseWithRestartAlways(t *testing.T) {
|
|||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
status := GetPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses)
|
||||
status := getPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses)
|
||||
assert.Equal(t, test.status, status, "[test %s]", test.test)
|
||||
}
|
||||
}
|
||||
|
|
@ -1945,7 +1945,7 @@ func TestPodPhaseWithRestartNever(t *testing.T) {
|
|||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
status := GetPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses)
|
||||
status := getPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses)
|
||||
assert.Equal(t, test.status, status, "[test %s]", test.test)
|
||||
}
|
||||
}
|
||||
|
|
@ -2058,7 +2058,7 @@ func TestPodPhaseWithRestartOnFailure(t *testing.T) {
|
|||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
status := GetPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses)
|
||||
status := getPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses)
|
||||
assert.Equal(t, test.status, status, "[test %s]", test.test)
|
||||
}
|
||||
}
|
||||
|
|
@ -2270,25 +2270,6 @@ func TestPortForward(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// Tests that identify the host port conflicts are detected correctly.
|
||||
func TestGetHostPortConflicts(t *testing.T) {
|
||||
pods := []*v1.Pod{
|
||||
{Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}},
|
||||
{Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 81}}}}}},
|
||||
{Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 82}}}}}},
|
||||
{Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 83}}}}}},
|
||||
}
|
||||
// Pods should not cause any conflict.
|
||||
assert.False(t, hasHostPortConflicts(pods), "Should not have port conflicts")
|
||||
|
||||
expected := &v1.Pod{
|
||||
Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 81}}}}},
|
||||
}
|
||||
// The new pod should cause conflict and be reported.
|
||||
pods = append(pods, expected)
|
||||
assert.True(t, hasHostPortConflicts(pods), "Should have port conflicts")
|
||||
}
|
||||
|
||||
func TestHasHostMountPVC(t *testing.T) {
|
||||
tests := map[string]struct {
|
||||
pvError error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue