Skip to content

Commit f19b62f

Browse files
authored
Merge pull request kubernetes#120959 from pohly/e2e-test-whitespace-cleanup
e2e: remove redundant spaces in test names
2 parents 6f5fa2e + 0e8a1f1 commit f19b62f

23 files changed

+101
-93
lines changed

hack/conformance/check_conformance_test_requirements.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
)
3131

3232
const (
33-
//e.g. framework.ConformanceIt("should provide secure master service ", func(ctx context.Context) {
33+
// e.g. framework.ConformanceIt("should provide secure master service", func(ctx context.Context) {
3434
patternStartConformance = `framework.ConformanceIt\(.*, func\(\) {$`
3535
patternEndConformance = `}\)$`
3636
patternSkip = `e2eskipper.Skip.*\(`

test/conformance/testdata/conformance.yaml

Lines changed: 55 additions & 47 deletions
Large diffs are not rendered by default.

test/e2e/apimachinery/custom_resource_definition.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var _ = SIGDescribe("CustomResourceDefinition resources [Privileged:ClusterAdmin
5656
Create the custom resource definition and then delete it. The creation and deletion MUST
5757
be successful.
5858
*/
59-
framework.ConformanceIt("creating/deleting custom resource definition objects works ", func(ctx context.Context) {
59+
framework.ConformanceIt("creating/deleting custom resource definition objects works", func(ctx context.Context) {
6060

6161
config, err := framework.LoadConfig()
6262
framework.ExpectNoError(err, "loading config")
@@ -83,7 +83,7 @@ var _ = SIGDescribe("CustomResourceDefinition resources [Privileged:ClusterAdmin
8383
custom resource definitions via delete collection; the delete MUST be successful and MUST delete only the
8484
labeled custom resource definitions.
8585
*/
86-
framework.ConformanceIt("listing custom resource definition objects works ", func(ctx context.Context) {
86+
framework.ConformanceIt("listing custom resource definition objects works", func(ctx context.Context) {
8787
testListSize := 10
8888
config, err := framework.LoadConfig()
8989
framework.ExpectNoError(err, "loading config")
@@ -143,7 +143,7 @@ var _ = SIGDescribe("CustomResourceDefinition resources [Privileged:ClusterAdmin
143143
Description: Create a custom resource definition. Attempt to read, update and patch its status sub-resource;
144144
all mutating sub-resource operations MUST be visible to subsequent reads.
145145
*/
146-
framework.ConformanceIt("getting/updating/patching custom resource definition status sub-resource works ", func(ctx context.Context) {
146+
framework.ConformanceIt("getting/updating/patching custom resource definition status sub-resource works", func(ctx context.Context) {
147147
config, err := framework.LoadConfig()
148148
framework.ExpectNoError(err, "loading config")
149149
apiExtensionClient, err := clientset.NewForConfig(config)
@@ -267,7 +267,7 @@ var _ = SIGDescribe("CustomResourceDefinition resources [Privileged:ClusterAdmin
267267
the default is applied. Create another CR. Remove default, add default for another field and read CR until
268268
new field is defaulted, but old default stays.
269269
*/
270-
framework.ConformanceIt("custom resource defaulting for requests and from storage works ", func(ctx context.Context) {
270+
framework.ConformanceIt("custom resource defaulting for requests and from storage works", func(ctx context.Context) {
271271
config, err := framework.LoadConfig()
272272
framework.ExpectNoError(err, "loading config")
273273
apiExtensionClient, err := clientset.NewForConfig(config)

test/e2e/apps/rc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ var _ = SIGDescribe("ReplicationController", func() {
6767
Testname: Replication Controller, run basic image
6868
Description: Replication Controller MUST create a Pod with Basic Image and MUST run the service with the provided image. Image MUST be tested by dialing into the service listening through TCP, UDP and HTTP.
6969
*/
70-
framework.ConformanceIt("should serve a basic image on each replica with a public image ", func(ctx context.Context) {
70+
framework.ConformanceIt("should serve a basic image on each replica with a public image", func(ctx context.Context) {
7171
TestReplicationControllerServeImageOrFail(ctx, f, "basic", framework.ServeHostnameImage)
7272
})
7373

test/e2e/apps/replica_set.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ var _ = SIGDescribe("ReplicaSet", func() {
109109
Testname: Replica Set, run basic image
110110
Description: Create a ReplicaSet with a Pod and a single Container. Make sure that the Pod is running. Pod SHOULD send a valid response when queried.
111111
*/
112-
framework.ConformanceIt("should serve a basic image on each replica with a public image ", func(ctx context.Context) {
112+
framework.ConformanceIt("should serve a basic image on each replica with a public image", func(ctx context.Context) {
113113
testReplicaSetServeImageOrFail(ctx, f, "basic", framework.ServeHostnameImage)
114114
})
115115

test/e2e/auth/service_accounts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ var _ = SIGDescribe("ServiceAccounts", func() {
7676
Token Mount path. All these three files MUST exist and the Service
7777
Account mount path MUST be auto mounted to the Container.
7878
*/
79-
framework.ConformanceIt("should mount an API token into pods ", func(ctx context.Context) {
79+
framework.ConformanceIt("should mount an API token into pods", func(ctx context.Context) {
8080
sa, err := f.ClientSet.CoreV1().ServiceAccounts(f.Namespace.Name).Create(ctx, &v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: "mount-test"}}, metav1.CreateOptions{})
8181
framework.ExpectNoError(err)
8282

@@ -159,7 +159,7 @@ var _ = SIGDescribe("ServiceAccounts", func() {
159159
include test cases 1a,1b,2a,2b and 2c.
160160
In the test cases 1c,3a,3b and 3c the ServiceTokenVolume MUST not be auto mounted.
161161
*/
162-
framework.ConformanceIt("should allow opting out of API token automount ", func(ctx context.Context) {
162+
framework.ConformanceIt("should allow opting out of API token automount", func(ctx context.Context) {
163163

164164
var err error
165165
trueValue := true

test/e2e/common/node/runtimeclass.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ var _ = SIGDescribe("RuntimeClass", func() {
187187
The runtimeclasses resource MUST exist in the /apis/node.k8s.io/v1 discovery document.
188188
The runtimeclasses resource must support create, get, list, watch, update, patch, delete, and deletecollection.
189189
*/
190-
framework.ConformanceIt(" should support RuntimeClasses API operations", func(ctx context.Context) {
190+
framework.ConformanceIt("should support RuntimeClasses API operations", func(ctx context.Context) {
191191
// Setup
192192
rcVersion := "v1"
193193
rcClient := f.ClientSet.NodeV1().RuntimeClasses()

test/e2e/kubectl/kubectl.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ var _ = SIGDescribe("Kubectl client", func() {
339339
Testname: Kubectl, replication controller
340340
Description: Create a Pod and a container with a given image. Configure replication controller to run 2 replicas. The number of running instances of the Pod MUST equal the number of replicas set on the replication controller which is 2.
341341
*/
342-
framework.ConformanceIt("should create and stop a replication controller ", func(ctx context.Context) {
342+
framework.ConformanceIt("should create and stop a replication controller", func(ctx context.Context) {
343343
defer cleanupKubectlInputs(nautilus, ns, updateDemoSelector)
344344

345345
ginkgo.By("creating a replication controller")
@@ -352,7 +352,7 @@ var _ = SIGDescribe("Kubectl client", func() {
352352
Testname: Kubectl, scale replication controller
353353
Description: Create a Pod and a container with a given image. Configure replication controller to run 2 replicas. The number of running instances of the Pod MUST equal the number of replicas set on the replication controller which is 2. Update the replicaset to 1. Number of running instances of the Pod MUST be 1. Update the replicaset to 2. Number of running instances of the Pod MUST be 2.
354354
*/
355-
framework.ConformanceIt("should scale a replication controller ", func(ctx context.Context) {
355+
framework.ConformanceIt("should scale a replication controller", func(ctx context.Context) {
356356
defer cleanupKubectlInputs(nautilus, ns, updateDemoSelector)
357357

358358
ginkgo.By("creating a replication controller")
@@ -394,7 +394,7 @@ var _ = SIGDescribe("Kubectl client", func() {
394394
Testname: Kubectl, guestbook application
395395
Description: Create Guestbook application that contains an agnhost primary server, 2 agnhost replicas, frontend application, frontend service and agnhost primary service and agnhost replica service. Using frontend service, the test will write an entry into the guestbook application which will store the entry into the backend agnhost store. Application flow MUST work as expected and the data written MUST be available to read.
396396
*/
397-
framework.ConformanceIt("should create and stop a working application ", func(ctx context.Context) {
397+
framework.ConformanceIt("should create and stop a working application", func(ctx context.Context) {
398398
defer forEachGBFile(func(contents string) {
399399
cleanupKubectlInputs(contents, ns)
400400
})
@@ -822,7 +822,7 @@ metadata:
822822
Testname: Kubectl, check version v1
823823
Description: Run kubectl to get api versions, output MUST contain returned versions with 'v1' listed.
824824
*/
825-
framework.ConformanceIt("should check if v1 is in available api versions ", func(ctx context.Context) {
825+
framework.ConformanceIt("should check if v1 is in available api versions", func(ctx context.Context) {
826826
ginkgo.By("validating api versions")
827827
output := e2ekubectl.RunKubectlOrDie(ns, "api-versions")
828828
if !strings.Contains(output, "v1") {
@@ -1308,7 +1308,7 @@ metadata:
13081308
Testname: Kubectl, cluster info
13091309
Description: Call kubectl to get cluster-info, output MUST contain cluster-info returned and Kubernetes control plane SHOULD be running.
13101310
*/
1311-
framework.ConformanceIt("should check if Kubernetes control plane services is included in cluster-info ", func(ctx context.Context) {
1311+
framework.ConformanceIt("should check if Kubernetes control plane services is included in cluster-info", func(ctx context.Context) {
13121312
ginkgo.By("validating cluster-info")
13131313
output := e2ekubectl.RunKubectlOrDie(ns, "cluster-info")
13141314
// Can't check exact strings due to terminal control commands (colors)
@@ -1334,7 +1334,7 @@ metadata:
13341334
Testname: Kubectl, describe pod or rc
13351335
Description: Deploy an agnhost controller and an agnhost service. Kubectl describe pods SHOULD return the name, namespace, labels, state and other information as expected. Kubectl describe on rc, service, node and namespace SHOULD also return proper information.
13361336
*/
1337-
framework.ConformanceIt("should check if kubectl describe prints relevant information for rc and pods ", func(ctx context.Context) {
1337+
framework.ConformanceIt("should check if kubectl describe prints relevant information for rc and pods", func(ctx context.Context) {
13381338
controllerJSON := commonutils.SubstituteImageName(string(readTestFileOrDie(agnhostControllerFilename)))
13391339
serviceJSON := readTestFileOrDie(agnhostServiceFilename)
13401340

@@ -1473,7 +1473,7 @@ metadata:
14731473
Testname: Kubectl, create service, replication controller
14741474
Description: Create a Pod running agnhost listening to port 6379. Using kubectl expose the agnhost primary replication controllers at port 1234. Validate that the replication controller is listening on port 1234 and the target port is set to 6379, port that agnhost primary is listening. Using kubectl expose the agnhost primary as a service at port 2345. The service MUST be listening on port 2345 and the target port is set to 6379, port that agnhost primary is listening.
14751475
*/
1476-
framework.ConformanceIt("should create services for rc ", func(ctx context.Context) {
1476+
framework.ConformanceIt("should create services for rc", func(ctx context.Context) {
14771477
controllerJSON := commonutils.SubstituteImageName(string(readTestFileOrDie(agnhostControllerFilename)))
14781478

14791479
agnhostPort := 6379
@@ -1567,7 +1567,7 @@ metadata:
15671567
Testname: Kubectl, label update
15681568
Description: When a Pod is running, update a Label using 'kubectl label' command. The label MUST be created in the Pod. A 'kubectl get pod' with -l option on the container MUST verify that the label can be read back. Use 'kubectl label label-' to remove the label. 'kubectl get pod' with -l option SHOULD not list the deleted label as the label is removed.
15691569
*/
1570-
framework.ConformanceIt("should update the label on a resource ", func(ctx context.Context) {
1570+
framework.ConformanceIt("should update the label on a resource", func(ctx context.Context) {
15711571
labelName := "testing-label"
15721572
labelValue := "testing-label-value"
15731573

@@ -1633,7 +1633,7 @@ metadata:
16331633
Testname: Kubectl, patch to annotate
16341634
Description: Start running agnhost and a replication controller. When the pod is running, using 'kubectl patch' command add annotations. The annotation MUST be added to running pods and SHOULD be able to read added annotations from each of the Pods running under the replication controller.
16351635
*/
1636-
framework.ConformanceIt("should add annotations for pods in rc ", func(ctx context.Context) {
1636+
framework.ConformanceIt("should add annotations for pods in rc", func(ctx context.Context) {
16371637
controllerJSON := commonutils.SubstituteImageName(string(readTestFileOrDie(agnhostControllerFilename)))
16381638
ginkgo.By("creating Agnhost RC")
16391639
e2ekubectl.RunKubectlOrDieInput(ns, controllerJSON, "create", "-f", "-")
@@ -1666,7 +1666,7 @@ metadata:
16661666
Testname: Kubectl, version
16671667
Description: The command 'kubectl version' MUST return the major, minor versions, GitCommit, etc of the Client and the Server that the kubectl is configured to connect to.
16681668
*/
1669-
framework.ConformanceIt("should check is all data is printed ", func(ctx context.Context) {
1669+
framework.ConformanceIt("should check is all data is printed", func(ctx context.Context) {
16701670
versionString := e2ekubectl.RunKubectlOrDie(ns, "version")
16711671
// we expect following values for: Major -> digit, Minor -> numeric followed by an optional '+', GitCommit -> alphanumeric
16721672
requiredItems := []string{"Client Version: ", "Server Version: "}
@@ -1699,7 +1699,7 @@ metadata:
16991699
Testname: Kubectl, run pod
17001700
Description: Command 'kubectl run' MUST create a pod, when a image name is specified in the run command. After the run command there SHOULD be a pod that should exist with one container running the specified image.
17011701
*/
1702-
framework.ConformanceIt("should create a pod from an image when restart is Never ", func(ctx context.Context) {
1702+
framework.ConformanceIt("should create a pod from an image when restart is Never", func(ctx context.Context) {
17031703
ginkgo.By("running the image " + httpdImage)
17041704
e2ekubectl.RunKubectlOrDie(ns, "run", podName, "--restart=Never", podRunningTimeoutArg, "--image="+httpdImage)
17051705
ginkgo.By("verifying the pod " + podName + " was created")
@@ -1733,7 +1733,7 @@ metadata:
17331733
Testname: Kubectl, replace
17341734
Description: Command 'kubectl replace' on a existing Pod with a new spec MUST update the image of the container running in the Pod. A -f option to 'kubectl replace' SHOULD force to re-create the resource. The new Pod SHOULD have the container with new change to the image.
17351735
*/
1736-
framework.ConformanceIt("should update a single-container pod's image ", func(ctx context.Context) {
1736+
framework.ConformanceIt("should update a single-container pod's image", func(ctx context.Context) {
17371737
ginkgo.By("running the image " + httpdImage)
17381738
e2ekubectl.RunKubectlOrDie(ns, "run", podName, "--image="+httpdImage, podRunningTimeoutArg, "--labels=run="+podName)
17391739

@@ -1773,7 +1773,7 @@ metadata:
17731773
Testname: Kubectl, proxy port zero
17741774
Description: Start a proxy server on port zero by running 'kubectl proxy' with --port=0. Call the proxy server by requesting api versions from unix socket. The proxy server MUST provide at least one version string.
17751775
*/
1776-
framework.ConformanceIt("should support proxy with --port 0 ", func(ctx context.Context) {
1776+
framework.ConformanceIt("should support proxy with --port 0", func(ctx context.Context) {
17771777
ginkgo.By("starting the proxy server")
17781778
port, cmd, err := startProxyServer(ns)
17791779
if cmd != nil {
@@ -1798,7 +1798,7 @@ metadata:
17981798
Testname: Kubectl, proxy socket
17991799
Description: Start a proxy server on by running 'kubectl proxy' with --unix-socket=<some path>. Call the proxy server by requesting api versions from http://locahost:0/api. The proxy server MUST provide at least one version string
18001800
*/
1801-
framework.ConformanceIt("should support --unix-socket=/path ", func(ctx context.Context) {
1801+
framework.ConformanceIt("should support --unix-socket=/path", func(ctx context.Context) {
18021802
ginkgo.By("Starting the proxy")
18031803
tmpdir, err := os.MkdirTemp("", "kubectl-proxy-unix")
18041804
if err != nil {

test/e2e/kubectl/logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var _ = SIGDescribe("Kubectl logs", func() {
111111
'kubectl --since=1s' should output logs that are only 1 second older from now
112112
'kubectl --since=24h' should output logs that are only 1 day older from now
113113
*/
114-
framework.ConformanceIt("should be able to retrieve and filter logs ", func(ctx context.Context) {
114+
framework.ConformanceIt("should be able to retrieve and filter logs", func(ctx context.Context) {
115115

116116
ginkgo.By("Waiting for log generator to start.")
117117
if !e2epod.CheckPodsRunningReadyOrSucceeded(ctx, c, ns, []string{podName}, framework.PodStartTimeout) {

test/e2e/network/dns.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var _ = common.SIGDescribe("DNS", func() {
4747
Testname: DNS, cluster
4848
Description: When a Pod is created, the pod MUST be able to resolve cluster dns entries such as kubernetes.default via DNS.
4949
*/
50-
framework.ConformanceIt("should provide DNS for the cluster ", func(ctx context.Context) {
50+
framework.ConformanceIt("should provide DNS for the cluster", func(ctx context.Context) {
5151
// All the names we need to be able to resolve.
5252
// TODO: Spin up a separate test service and test that dns works for that service.
5353
// NOTE: This only contains the FQDN and the Host name, for testing partial name, see the test below
@@ -134,7 +134,7 @@ var _ = common.SIGDescribe("DNS", func() {
134134
Testname: DNS, services
135135
Description: When a headless service is created, the service MUST be able to resolve all the required service endpoints. When the service is created, any pod in the same namespace must be able to resolve the service by all of the expected DNS names.
136136
*/
137-
framework.ConformanceIt("should provide DNS for services ", func(ctx context.Context) {
137+
framework.ConformanceIt("should provide DNS for services", func(ctx context.Context) {
138138
// NOTE: This only contains the FQDN and the Host name, for testing partial name, see the test below
139139
// Create a test headless service.
140140
ginkgo.By("Creating a test headless service")

0 commit comments

Comments
 (0)