Merge pull request #88531 from claudiubelu/tests/configurable-private-image-pull

tests: Adds configurable docker conf for test
This commit is contained in:
Kubernetes Prow Robot
2020-03-17 16:21:19 -07:00
committed by GitHub
3 changed files with 12 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ package common
import (
"context"
"fmt"
"io/ioutil"
"path"
"time"
@@ -294,7 +295,12 @@ while true; do sleep 1; done
}
}
}`
// we might be told to use a different docker config JSON.
if framework.TestContext.DockerConfigFile != "" {
contents, err := ioutil.ReadFile(framework.TestContext.DockerConfigFile)
framework.ExpectNoError(err)
auth = string(contents)
}
secret := &v1.Secret{
Data: map[string][]byte{v1.DockerConfigJsonKey: []byte(auth)},
Type: v1.SecretTypeDockerConfigJson,