mirror of https://github.com/k3s-io/k3s
move the container name fix to NewTestPod to avoid breakage in other unit tests in the future
parent
5e4992aa5e
commit
f956f23d37
|
@ -344,7 +344,6 @@ func TestExecutorLaunchAndKillTask(t *testing.T) {
|
|||
}
|
||||
|
||||
pod := NewTestPod(1)
|
||||
pod.Spec.Containers[0].Name = "foo"
|
||||
podTask, err := podtask.New(api.NewDefaultContext(), "",
|
||||
*pod, &mesosproto.ExecutorInfo{})
|
||||
assert.Equal(t, nil, err, "must be able to create a task from a pod")
|
||||
|
@ -503,6 +502,7 @@ func NewTestPod(i int) *api.Pod {
|
|||
Spec: api.PodSpec{
|
||||
Containers: []api.Container{
|
||||
{
|
||||
Name: "foo",
|
||||
Ports: []api.ContainerPort{
|
||||
{
|
||||
ContainerPort: 8000 + i,
|
||||
|
|
Loading…
Reference in New Issue