Fixes static check failures in test/e2e_node/*
This commit is contained in:
@@ -87,16 +87,24 @@ func checkIPTables() (err error) {
|
||||
func checkPublicGCR() error {
|
||||
const image = "k8s.gcr.io/busybox"
|
||||
output, err := runCommand("docker", "images", "-q", image)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(output) != 0 {
|
||||
if _, err := runCommand("docker", "rmi", "-f", image); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
output, err = runCommand("docker", "pull", image)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(output) == 0 {
|
||||
return fmt.Errorf("failed to pull %s", image)
|
||||
}
|
||||
if _, err = runCommand("docker", "rmi", "-f", image); err != nil {
|
||||
if _, err := runCommand("docker", "rmi", "-f", image); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user