const namespaceCleanupTimeout … var progressReporter … var _ … var _ … // RunE2ETests checks configuration parameters (specified through flags) and then runs // E2E tests using the Ginkgo runner. // If a "report directory" is specified, one or more JUnit test reports will be // generated in this directory, and cluster logs will also be saved. // This function is called on each Ginkgo node in parallel mode. func RunE2ETests(t *testing.T) { … } // getDefaultClusterIPFamily obtains the default IP family of the cluster // using the Cluster IP address of the kubernetes service created in the default namespace // This unequivocally identifies the default IP family because services are single family // TODO: dual-stack may support multiple families per service // but we can detect if a cluster is dual stack because pods have two addresses (one per family) func getDefaultClusterIPFamily(ctx context.Context, c clientset.Interface) string { … } // waitForDaemonSets for all daemonsets in the given namespace to be ready // (defined as all but 'allowedNotReadyNodes' pods associated with that // daemonset are ready). // // If allowedNotReadyNodes is -1, this method returns immediately without waiting. func waitForDaemonSets(ctx context.Context, c clientset.Interface, ns string, allowedNotReadyNodes int32, timeout time.Duration) error { … } // setupSuite is the boilerplate that can be used to setup ginkgo test suites, on the SynchronizedBeforeSuite step. // There are certain operations we only want to run once per overall test invocation // (such as deleting old namespaces, or verifying that all system pods are running. // Because of the way Ginkgo runs tests in parallel, we must use SynchronizedBeforeSuite // to ensure that these operations only run on the first parallel Ginkgo node. // // This function takes two parameters: one function which runs on only the first Ginkgo node, // returning an opaque byte array, and then a second function which runs on all Ginkgo nodes, // accepting the byte array. func setupSuite(ctx context.Context) { … } // logClusterImageSources writes out cluster image sources. func logClusterImageSources() { … } // Returns control plane node & worker node image string, or error func lookupClusterImageSources() (string, string, error) { … } // setupSuitePerGinkgoNode is the boilerplate that can be used to setup ginkgo test suites, on the SynchronizedBeforeSuite step. // There are certain operations we only want to run once per overall test invocation on each Ginkgo node // such as making some global variables accessible to all parallel executions // Because of the way Ginkgo runs tests in parallel, we must use SynchronizedBeforeSuite // Ref: https://onsi.github.io/ginkgo/#parallel-specs func setupSuitePerGinkgoNode(ctx context.Context) { … } func prepullImages(ctx context.Context, c clientset.Interface) { … }