Skip to content

Commit 1a6a182

Browse files
committed
test clean up
1 parent af997e1 commit 1a6a182

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

tests/e2e/multiSvc/multi_svc_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import (
4545

4646
var e2eTestConfig *config.E2eTestConfig
4747

48-
var _ = ginkgo.Describe("[csi-multi-svc-refactor] Multi-SVC", func() {
48+
var _ = ginkgo.Describe("[csi-multi-svc] Multi-SVC", func() {
4949
var (
5050
namespaces []string
5151
numberOfSvc int
@@ -241,7 +241,7 @@ var _ = ginkgo.Describe("[csi-multi-svc-refactor] Multi-SVC", func() {
241241
3. Delete all the sts and pvcs which belong to them
242242
*/
243243

244-
ginkgo.It("[csi-multi-svc] Workload creation on each of the clusters-new",
244+
ginkgo.It("[csi-multi-svc] Workload creation on each of the clusters",
245245
ginkgo.Label(constants.P0, constants.Wcp, constants.MultiSvc, constants.Vc80), func() {
246246
ctx, cancel := context.WithCancel(context.Background())
247247
defer cancel()
@@ -401,7 +401,7 @@ var _ = ginkgo.Describe("[csi-multi-svc-refactor] Multi-SVC", func() {
401401
3. Delete the SVC cluster
402402
*/
403403

404-
ginkgo.It("[csi-multi-svc] Verify permissions of the service account-new",
404+
ginkgo.It("[csi-multi-svc] Verify permissions of the service account",
405405
ginkgo.Label(constants.P0, constants.Wcp, constants.MultiSvc, constants.Vc80), func() {
406406
ctx, cancel := context.WithCancel(context.Background())
407407
defer cancel()
@@ -482,7 +482,7 @@ var _ = ginkgo.Describe("[csi-multi-svc-refactor] Multi-SVC", func() {
482482
*/
483483

484484
ginkgo.It("[csi-multi-svc] Verify that an alarm is raised when a shared datastore "+
485-
"becomes non-shared-new", ginkgo.Label(constants.P0, constants.Wcp, constants.MultiSvc, constants.Vc80), func() {
485+
"becomes non-shared", ginkgo.Label(constants.P0, constants.Wcp, constants.MultiSvc, constants.Vc80), func() {
486486
ctx, cancel := context.WithCancel(context.Background())
487487
defer cancel()
488488

@@ -597,7 +597,7 @@ var _ = ginkgo.Describe("[csi-multi-svc-refactor] Multi-SVC", func() {
597597
598598
*/
599599

600-
ginkgo.It("[csi-multi-svc] Move a shared datastore from one SVC to another and check permission-new",
600+
ginkgo.It("[csi-multi-svc] Move a shared datastore from one SVC to another and check permission",
601601
ginkgo.Label(constants.P0, constants.Wcp, constants.MultiSvc, constants.Vc80), func() {
602602
ctx, cancel := context.WithCancel(context.Background())
603603
defer cancel()

tests/e2e/multiSvc/multi_svc_util.go

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
"k8s.io/kubernetes/test/e2e/framework"
3939
)
4040

41-
// getSvcCountAndComputeClusterPath method is used to get number of clusters and it's computeCluster path
41+
// GetSvcCountAndComputeClusterPath method is used to get number of clusters and it's computeCluster path
4242
func GetSvcCountAndComputeClusterPath(e2eTestConfig *config.E2eTestConfig) (int, []string, error) {
4343
computeClusterPath := vcutil.GovcLoginCmd(e2eTestConfig) + "govc namespace.cluster.ls"
4444
framework.Logf("To get number of compute cluster and it's path - command : %s", computeClusterPath)
@@ -53,7 +53,7 @@ func GetSvcCountAndComputeClusterPath(e2eTestConfig *config.E2eTestConfig) (int,
5353
return len(listPath), listPath, nil
5454
}
5555

56-
// mountNfsDatastoreOnClusterOrHost method is used to add a new datastore to cluster
56+
// MountNfsDatastoreOnClusterOrHost method is used to add a new datastore to cluster
5757
func MountNfsDatastoreOnClusterOrHost(e2eTestConfig *config.E2eTestConfig, datastoreName string, datastoreIP string,
5858
clusterPath string) error {
5959
mountDsOnCluster := vcutil.GovcLoginCmd(e2eTestConfig) + "govc datastore.create -type nfs -name " + datastoreName +
@@ -83,7 +83,7 @@ func UnMountNfsDatastoreFromClusterOrHost(e2eTestConfig *config.E2eTestConfig, d
8383
return nil
8484
}
8585

86-
// verifyPermissionForWcpStorageUser method is used to check permission of service account user
86+
// VerifyPermissionForWcpStorageUser method is used to check permission of service account user
8787
func VerifyPermissionForWcpStorageUser(ctx context.Context, e2eTestConfig *config.E2eTestConfig, entity string,
8888
path string, serviceAccountUser string, role string) (bool, error) {
8989
var permissionCheckSvcUser string = vcutil.GovcLoginCmd(e2eTestConfig)
@@ -119,14 +119,10 @@ func VerifyPermissionForWcpStorageUser(ctx context.Context, e2eTestConfig *confi
119119
return true, waitErr
120120
}
121121

122-
// isAlarmPresentOnDatacenter method is used to check if alarm is generated on a dataCenter
122+
// IsAlarmPresentOnDatacenter method is used to check if alarm is generated on a dataCenter
123123
func IsAlarmPresentOnDatacenter(ctx context.Context, e2eTestConfig *config.E2eTestConfig, datacenter string,
124124
alarmToVerify string, alarmShouldExists bool) (bool, error) {
125125
alarmCmd := vcutil.GovcLoginCmd(e2eTestConfig) + "govc alarms " + datacenter
126-
// alarmCmd := vcutil.GovcLoginCmd(e2eTestConfig) +
127-
// fmt.Sprintf("govc alarms -n='%s' ", alarmToVerify) +
128-
// datacenter
129-
130126
framework.Logf("Get alarms from datacenter - command : %s", alarmCmd)
131127
waitErr := wait.PollUntilContextTimeout(ctx, constants.HealthStatusPollInterval, constants.PollTimeoutSixMin, true,
132128
func(ctx context.Context) (bool, error) {
@@ -170,7 +166,7 @@ func IsAlarmPresentOnDatacenter(ctx context.Context, e2eTestConfig *config.E2eTe
170166
return true, waitErr
171167
}
172168

173-
// removeEsxiHostFromCluster method is used to remove esxi hosts from cluster
169+
// RemoveEsxiHostFromCluster method is used to remove esxi hosts from cluster
174170
func RemoveEsxiHostFromCluster(e2eTestConfig *config.E2eTestConfig, datacenter string, cluster string,
175171
hostIP string) (bool, error) {
176172
removeHostFromCluster := vcutil.GovcLoginCmd(e2eTestConfig) + "govc object.mv /" + datacenter + "/host/" + cluster +
@@ -185,7 +181,7 @@ func RemoveEsxiHostFromCluster(e2eTestConfig *config.E2eTestConfig, datacenter s
185181
return true, nil
186182
}
187183

188-
// moveHostToCluster method is used to move a host to cluster
184+
// MoveHostToCluster method is used to move a host to cluster
189185
func MoveHostToCluster(e2eTestConfig *config.E2eTestConfig, clusterPath string, hostIP string) error {
190186
moveHostToCluster := vcutil.GovcLoginCmd(e2eTestConfig) + "govc cluster.mv -cluster " + clusterPath + " " + hostIP
191187
framework.Logf("Move a host to cluster command : %s", moveHostToCluster)
@@ -198,7 +194,7 @@ func MoveHostToCluster(e2eTestConfig *config.E2eTestConfig, clusterPath string,
198194
return nil
199195
}
200196

201-
// getVcSessionIDsforSupervisor method returns list of vc session id for a supervisor id and returns error if any
197+
// GetVcSessionIDsforSupervisor method returns list of vc session id for a supervisor id and returns error if any
202198
func GetVcSessionIDsforSupervisor(e2eTestConfig *config.E2eTestConfig, supervisorId string) ([]string, error) {
203199
getSessionId := vcutil.GovcLoginCmd(e2eTestConfig) + "govc session.ls | grep 'csi-useragent' | grep '" +
204200
supervisorId + "' | awk '{print $1}'"
@@ -212,7 +208,7 @@ func GetVcSessionIDsforSupervisor(e2eTestConfig *config.E2eTestConfig, superviso
212208
return sessionIds, nil
213209
}
214210

215-
// killVcSessionIDs remove vc session id for a supervisor cluster
211+
// KillVcSessionIDs remove vc session id for a supervisor cluster
216212
func KillVcSessionIDs(e2eTestConfig *config.E2eTestConfig, sessionIds []string) error {
217213
var govcLogin string = vcutil.GovcLoginCmd(e2eTestConfig)
218214
for _, sessionId := range sessionIds {
@@ -228,7 +224,7 @@ func KillVcSessionIDs(e2eTestConfig *config.E2eTestConfig, sessionIds []string)
228224
return nil
229225
}
230226

231-
// getSvcConfigSecretData returns data obtained fom csi config secret
227+
// GetSvcConfigSecretData returns data obtained fom csi config secret
232228
// in namespace where CSI is deployed
233229
func GetSvcConfigSecretData(client clientset.Interface, ctx context.Context, e2eTestConfig *config.E2eTestConfig,
234230
csiNamespace string) (config.E2eTestConfig, error) {
@@ -246,7 +242,7 @@ func GetSvcConfigSecretData(client clientset.Interface, ctx context.Context, e2e
246242
return vsphereCfg, nil
247243
}
248244

249-
// getDatastoreNamesFromDCs method is used to fetch datastore details from a multi-supervisor testbed
245+
// GetDatastoreNamesFromDCs method is used to fetch datastore details from a multi-supervisor testbed
250246
func GetDatastoreNamesFromDCs(sshClientConfig *ssh.ClientConfig, e2eTestConfig *config.E2eTestConfig,
251247
dataCenters []*object.Datacenter) ([]string, error) {
252248
var dsList, datastores []string
@@ -271,7 +267,7 @@ func GetDatastoreNamesFromDCs(sshClientConfig *ssh.ClientConfig, e2eTestConfig *
271267
return datastores, nil
272268
}
273269

274-
// waitAndCompareSessionIDList method is used to match new session ids with old session ids
270+
// WaitAndCompareSessionIDList method is used to match new session ids with old session ids
275271
func WaitAndCompareSessionIDList(ctx context.Context, e2eTestConfig *config.E2eTestConfig, supervisorId string,
276272
oldSessionIds []string) (bool, error) {
277273
var newSessionIds []string

0 commit comments

Comments
 (0)