Add image white list, images in white list will be prepulled, and

only images in white list could be used in the test. Currently only
enabled in node e2e test.
This commit is contained in:
Random-Liu
2016-09-15 14:49:14 -07:00
parent 920581d964
commit ed411c9042
16 changed files with 102 additions and 70 deletions

View File

@@ -47,7 +47,6 @@ import (
var e2es *services.E2EServices
var prePullImages = flag.Bool("prepull-images", true, "If true, prepull images so image pull failures do not cause test failures.")
var runServicesMode = flag.Bool("run-services-mode", false, "If true, only run services (etcd, apiserver) in current process, and not run test.")
func init() {
@@ -94,7 +93,7 @@ var _ = SynchronizedBeforeSuite(func() []byte {
}
// Pre-pull the images tests depend on so we can fail immediately if there is an image pull issue
// This helps with debugging test flakes since it is hard to tell when a test failure is due to image pulling.
if *prePullImages {
if framework.TestContext.PrepullImages {
glog.Infof("Pre-pulling images so that they are cached for the tests.")
err := PrePullAllImages()
Expect(err).ShouldNot(HaveOccurred())