type E2EServices … // NewE2EServices returns a new E2EServices instance. func NewE2EServices(monitorParent bool) *E2EServices { … } // Start starts the e2e services in another process by calling back into the // test binary. Returns when all e2e services are ready or an error. // // We want to statically link e2e services into the test binary, but we don't // want their glog output to pollute the test result. So we run the binary in // run-services-mode to start e2e services in another process. // The function starts 2 processes: // * internal e2e services: services which statically linked in the test binary - apiserver, etcd and // namespace controller. // * kubelet: kubelet binary is outside. (We plan to move main kubelet start logic out when we have // standard kubelet launcher) func (e *E2EServices) Start(featureGates map[string]bool) error { … } // Stop stops the e2e services. func (e *E2EServices) Stop() { … } // RunE2EServices actually start the e2e services. This function is used to // start e2e services in current process. This is only used in run-services-mode. func RunE2EServices(t *testing.T) { … } const servicesLogFile … const LogVerbosityLevel … // startInternalServices starts the internal services in a separate process. func (e *E2EServices) startInternalServices() (*server, error) { … } // collectLogFiles collects logs of interest either via journalctl or by creating sym // links. Since we scp files from the remote directory, symlinks will be // treated as normal files and file contents will be copied over. func (e *E2EServices) collectLogFiles() { … } // isJournaldAvailable returns whether the system executing the tests uses // journald. func isJournaldAvailable() bool { … } func copyLogFile(src, target string) error { … }