(plugins []string, pluginEnvs PluginEnvVars, e2eRegistry, e2eRegistryConfig, k8sVersion string, client image.Client)
| 339 | } |
| 340 | |
| 341 | func pullImages(plugins []string, pluginEnvs PluginEnvVars, e2eRegistry, e2eRegistryConfig, k8sVersion string, client image.Client) []error { |
| 342 | images, err := collectPluginsImages(plugins, pluginEnvs, k8sVersion, client) |
| 343 | if err != nil { |
| 344 | return []error{err, errors.Errorf("unable to collect images of plugins")} |
| 345 | } |
| 346 | switch { |
| 347 | case e2eRegistry != "": |
| 348 | imagePairs, err := convertImagesToPairs(images, e2eRegistry, "", k8sVersion) |
| 349 | if err != nil { |
| 350 | return []error{err} |
| 351 | } |
| 352 | images = []string{} |
| 353 | for _, imagePair := range imagePairs { |
| 354 | images = append(images, imagePair.Dst) |
| 355 | } |
| 356 | case e2eRegistryConfig != "": |
| 357 | imagePairs, err := convertImagesToPairs(images, "", e2eRegistryConfig, k8sVersion) |
| 358 | if err != nil { |
| 359 | return []error{err} |
| 360 | } |
| 361 | images = []string{} |
| 362 | for _, imagePair := range imagePairs { |
| 363 | images = append(images, imagePair.Dst) |
| 364 | } |
| 365 | } |
| 366 | return client.PullImages(images, numDockerRetries) |
| 367 | } |
| 368 | |
| 369 | func downloadImages(plugins []string, pluginEnvs PluginEnvVars, e2eRegistryConfig, k8sVersion string, client image.Client) error { |
| 370 | images, err := collectPluginsImages(plugins, pluginEnvs, k8sVersion, client) |
no test coverage detected