WithContainer ensures that in the current status there is a container with the passed name
(name string)
| 98 | // WithContainer ensures that in the current status there is a container |
| 99 | // with the passed name |
| 100 | func (builder *Builder) WithContainer(name string) *Builder { |
| 101 | for _, value := range builder.status.Spec.Containers { |
| 102 | if value.Name == name { |
| 103 | return builder |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | builder.status.Spec.Containers = append(builder.status.Spec.Containers, |
| 108 | corev1.Container{ |
| 109 | Name: name, |
| 110 | }) |
| 111 | return builder |
| 112 | } |
| 113 | |
| 114 | // WithContainerImage ensures that, if in the current status there is |
| 115 | // a container with the passed name and the image is empty, the image will be |
no outgoing calls
no test coverage detected