diff --git a/test/integration/examples/apiserver_test.go b/test/integration/examples/apiserver_test.go index 0e43683ba89..5465ac69bb2 100644 --- a/test/integration/examples/apiserver_test.go +++ b/test/integration/examples/apiserver_test.go @@ -73,13 +73,13 @@ func TestAPIServiceWaitOnStart(t *testing.T) { } t.Cleanup(func() { etcd3Client.Close() }) - // Pollute CRD path in etcd so CRD lists cannot succeed and the informer cannot sync + t.Log("Pollute CRD path in etcd so CRD lists cannot succeed and the informer cannot sync") bogusCRDEtcdPath := path.Join("/", etcdConfig.Prefix, "apiextensions.k8s.io/customresourcedefinitions/bogus") if _, err := etcd3Client.KV.Put(ctx, bogusCRDEtcdPath, `bogus data`); err != nil { t.Fatal(err) } - // Populate a valid CRD and managed APIService in etcd + t.Log("Populate a valid CRD and managed APIService in etcd") if _, err := etcd3Client.KV.Put( ctx, path.Join("/", etcdConfig.Prefix, "apiextensions.k8s.io/customresourcedefinitions/widgets.valid.example.com"), @@ -155,7 +155,7 @@ func TestAPIServiceWaitOnStart(t *testing.T) { t.Fatal(err) } - // Populate a stale managed APIService in etcd + t.Log("Populate a stale managed APIService in etcd") if _, err := etcd3Client.KV.Put( ctx, path.Join("/", etcdConfig.Prefix, "apiregistration.k8s.io/apiservices/v1.stale.example.com"), @@ -179,7 +179,7 @@ func TestAPIServiceWaitOnStart(t *testing.T) { t.Fatal(err) } - // Start server + t.Log("Starting server") options := kastesting.NewDefaultTestServerOptions() options.SkipHealthzCheck = true testServer := kastesting.StartTestServerOrDie(t, options, nil, etcdConfig) @@ -188,7 +188,7 @@ func TestAPIServiceWaitOnStart(t *testing.T) { kubeClientConfig := rest.CopyConfig(testServer.ClientConfig) aggregatorClient := aggregatorclient.NewForConfigOrDie(kubeClientConfig) - // ensure both APIService objects remain + t.Log("Ensure both APIService objects remain") for i := 0; i < 10; i++ { if _, err := aggregatorClient.ApiregistrationV1().APIServices().Get(ctx, "v1.valid.example.com", metav1.GetOptions{}); err != nil { t.Fatal(err) @@ -199,13 +199,12 @@ func TestAPIServiceWaitOnStart(t *testing.T) { time.Sleep(time.Second) } - // Clear the bogus CRD data so the informer can sync + t.Log("Clear the bogus CRD data so the informer can sync") if _, err := etcd3Client.KV.Delete(ctx, bogusCRDEtcdPath); err != nil { t.Fatal(err) } - t.Log("cleaned up bogus CRD data") - // ensure the stale APIService object is cleaned up + t.Log("Ensure the stale APIService object is cleaned up") if err := wait.Poll(time.Second, wait.ForeverTestTimeout, func() (bool, error) { _, err := aggregatorClient.ApiregistrationV1().APIServices().Get(ctx, "v1.stale.example.com", metav1.GetOptions{}) if err == nil { @@ -220,7 +219,7 @@ func TestAPIServiceWaitOnStart(t *testing.T) { t.Fatal(err) } - // ensure the valid APIService object remains + t.Log("Ensure the valid APIService object remains") for i := 0; i < 5; i++ { time.Sleep(time.Second) if _, err := aggregatorClient.ApiregistrationV1().APIServices().Get(ctx, "v1.valid.example.com", metav1.GetOptions{}); err != nil {