// This helps with debugging test flakes since it is hard to tell when a test failure is due to image pulling. if framework.TestContext.PrepullImages { glog.Infof("Pre-pulling images so that they are cached for the tests.") err := PrePullAllImages() Expect(err).ShouldNot(HaveOccurred()) } // TODO(yifan): Temporary workaround to disable coreos from auto restart // by masking the locksmithd. // We should mask locksmithd when provisioning the machine. maskLocksmithdOnCoreos() if *startServices { // If the services are expected to stop after test, they should monitor the test process. // If the services are expected to keep running after test, they should not monitor the test process. e2es = services.NewE2EServices(*stopServices) Expect(e2es.Start()).To(Succeed(), "should be able to start node services.") glog.Infof("Node services started. Running tests...") } else { glog.Infof("Running tests without starting services.") } glog.Infof("Wait for the node to be ready") waitForNodeReady() // Reference common test to make the import valid. commontest.CurrentSuite = commontest.NodeE2E data, err := json.Marshal(&framework.TestContext.NodeTestContextType) Expect(err).NotTo(HaveOccurred(), "should be able to serialize node test context.")
} // 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 framework.TestContext.PrepullImages { glog.Infof("Pre-pulling images so that they are cached for the tests.") err := PrePullAllImages() Expect(err).ShouldNot(HaveOccurred()) } // TODO(yifan): Temporary workaround to disable coreos from auto restart // by masking the locksmithd. // We should mask locksmithd when provisioning the machine. maskLocksmithdOnCoreos() if *startServices { e2es = services.NewE2EServices() Expect(e2es.Start()).To(Succeed(), "should be able to start node services.") glog.Infof("Node services started. Running tests...") } else { glog.Infof("Running tests without starting services.") } glog.Infof("Wait for the node to be ready") waitForNodeReady() // Reference common test to make the import valid. commontest.CurrentSuite = commontest.NodeE2E data, err := json.Marshal(&framework.TestContext.NodeTestContextType) Expect(err).NotTo(HaveOccurred(), "should be able to serialize node test context.")