Skip to content

Commit

Permalink
Merge pull request #63 from dell/fix_issues
Browse files Browse the repository at this point in the history
Fixed Go Formatting Issue
  • Loading branch information
adarsh-dell authored Feb 23, 2024
2 parents 06e66f9 + db5b8ef commit 0ec9fb7
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 141 deletions.
184 changes: 91 additions & 93 deletions pkg/cmd/certifycmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,100 +76,98 @@ func GetCertifyCommand() cli.Command {
Name: "certify",
Usage: "certify csi-driver",
Category: "main",
Flags: append(
[]cli.Flag{
cli.StringFlag{
Name: "cert-config",
Usage: "path to certification config file",
Required: true,
},
cli.StringFlag{
Name: "image-config",
Usage: "path to images config file",
},
cli.StringFlag{
Name: "config, conf, c",
Usage: "config for connecting to kubernetes",
EnvVar: "KUBECONFIG",
},
cli.StringFlag{
Name: "namespace, ns",
Usage: "specify the driver namespace (used in driver resource usage)",
},
cli.StringFlag{
Name: "longevity, long, l",
Usage: "launch in longevity mode with provided number of iterations. Accepted formats are:" +
" number of iterations (ex. 10) or time (ex. 3d.2h30m15s)",
Value: "1",
},
cli.StringFlag{
Name: "timeout, t",
Usage: "set the timeout value for all of the resources (accepts format like 2h30m15s) default is 0s",
Value: "0s",
},
cli.BoolFlag{
Name: "sequential, sq",
Usage: "include this flag to run the test suites sequentially",
},
cli.BoolFlag{
Name: "no-cleanup, nc",
Usage: "include this flag do disable cleanup between iterations",
},
cli.BoolFlag{
Name: "no-cleanup-on-fail, ncof",
Usage: "include this flag do disable cleanup on fail",
},
cli.StringFlag{
Name: "start-hook, sh",
Usage: "specify the path to the start-hook",
},
cli.StringFlag{
Name: "ready-hook, rh",
Usage: "specify the path to the ready-hook",
},
cli.StringFlag{
Name: "finish-hook, fh",
Usage: "specify the path to the finish-hook",
},
cli.BoolFlag{
Name: "no-metrics, nm",
Usage: "include this flag to disable event-based performance metrics, thus creating only-load scenario",
},
cli.BoolFlag{
Name: "no-reports, nr",
Usage: "include this flag to skip report generating stage",
},
cli.StringFlag{
Name: "observer-type, ot",
Usage: "set the observer type to use [event] or [list]",
Value: "event",
},
cli.StringFlag{
Name: "volumeSnapshotClass, vsc",
Usage: "define your volumeSnapshotClass",
},
cli.StringFlag{
Name: "reportPath, path",
Usage: "path to folder where reports will be created (if not specified `~/.cert-csi/` will be used)",
},
cli.StringFlag{
Name: "driver-namespace, driver-ns",
Usage: "specify the driver namespace to find the driver resources for the volume health metrics suite",
},
cli.StringFlag{
Name: "driver-name, driver",
Usage: "specify the driver for volume group snapshot",
},
cli.StringFlag{
Name: "vgs-volume-label",
Usage: "specify the volume label for VGS",
},
cli.StringFlag{
Name: "vgs-name",
Usage: "specify the volume group name",
},
Flags: []cli.Flag{
cli.StringFlag{
Name: "cert-config",
Usage: "path to certification config file",
Required: true,
},
),
cli.StringFlag{
Name: "image-config",
Usage: "path to images config file",
},
cli.StringFlag{
Name: "config, conf, c",
Usage: "config for connecting to kubernetes",
EnvVar: "KUBECONFIG",
},
cli.StringFlag{
Name: "namespace, ns",
Usage: "specify the driver namespace (used in driver resource usage)",
},
cli.StringFlag{
Name: "longevity, long, l",
Usage: "launch in longevity mode with provided number of iterations. Accepted formats are:" +
" number of iterations (ex. 10) or time (ex. 3d.2h30m15s)",
Value: "1",
},
cli.StringFlag{
Name: "timeout, t",
Usage: "set the timeout value for all of the resources (accepts format like 2h30m15s) default is 0s",
Value: "0s",
},
cli.BoolFlag{
Name: "sequential, sq",
Usage: "include this flag to run the test suites sequentially",
},
cli.BoolFlag{
Name: "no-cleanup, nc",
Usage: "include this flag do disable cleanup between iterations",
},
cli.BoolFlag{
Name: "no-cleanup-on-fail, ncof",
Usage: "include this flag do disable cleanup on fail",
},
cli.StringFlag{
Name: "start-hook, sh",
Usage: "specify the path to the start-hook",
},
cli.StringFlag{
Name: "ready-hook, rh",
Usage: "specify the path to the ready-hook",
},
cli.StringFlag{
Name: "finish-hook, fh",
Usage: "specify the path to the finish-hook",
},
cli.BoolFlag{
Name: "no-metrics, nm",
Usage: "include this flag to disable event-based performance metrics, thus creating only-load scenario",
},
cli.BoolFlag{
Name: "no-reports, nr",
Usage: "include this flag to skip report generating stage",
},
cli.StringFlag{
Name: "observer-type, ot",
Usage: "set the observer type to use [event] or [list]",
Value: "event",
},
cli.StringFlag{
Name: "volumeSnapshotClass, vsc",
Usage: "define your volumeSnapshotClass",
},
cli.StringFlag{
Name: "reportPath, path",
Usage: "path to folder where reports will be created (if not specified `~/.cert-csi/` will be used)",
},
cli.StringFlag{
Name: "driver-namespace, driver-ns",
Usage: "specify the driver namespace to find the driver resources for the volume health metrics suite",
},
cli.StringFlag{
Name: "driver-name, driver",
Usage: "specify the driver for volume group snapshot",
},
cli.StringFlag{
Name: "vgs-volume-label",
Usage: "specify the volume label for VGS",
},
cli.StringFlag{
Name: "vgs-name",
Usage: "specify the volume group name",
},
},
Before: updatePath,
Action: func(c *cli.Context) error {
viper.SetConfigType("yaml")
Expand Down
94 changes: 46 additions & 48 deletions pkg/cmd/k8se2ecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,55 +37,53 @@ func GetK8sEndToEndCommand() cli.Command {
Name: "k8s-e2e",
Usage: "k8s-e2e command to execute the kubernetes end-to-end testcases",
Category: "main",
Flags: append(
[]cli.Flag{
cli.StringFlag{
Name: "driver-config",
Usage: "path to test driver config file",
Required: true,
},
cli.StringFlag{
Name: "reportPath, path",
Usage: "path to folder where reports will be created (if not specified `$HOME/reports/execution_[storage-class].xml` will be used)",
},
cli.StringFlag{
Name: "focus",
Usage: "focus string(regx) what your k8s e2e tests should foucs on Ex: \"External.Storage.*\"",
},
cli.StringFlag{
Name: "focus-file",
Usage: "focus file(regx) what your k8s e2e tests should focus on Ex: 'testsuitename.go'",
},
cli.StringFlag{
Name: "config, conf, c",
Usage: "config for connecting to kubernetes",
EnvVar: "KUBECONFIG",
},
cli.StringFlag{
Name: "skip",
Usage: "skip string(regx) what your k8s e2e tests should skip Ex: '\\[Feature:|\\[Disruptive\\]'",
},
cli.StringFlag{
Name: "skip-file",
Usage: "skip file(regx) what your k8s e2e tests should skip Ex: 'testsuitename.go'",
},
cli.StringFlag{
Name: "skip-tests",
Usage: "skip unsupported tests give the file path Ex: /root/tests/skip.yaml" +
"ignore:\n" +
" - \"skip this test\"",
},
cli.StringFlag{
Name: "timeout",
Usage: "time out for kubernetes e2e command to exit default will be 1h Ex: 2h",
},
cli.StringFlag{
Name: "version",
Usage: "Kubernetes version that you want to test end-to-end tests",
Required: true,
},
Flags: []cli.Flag{
cli.StringFlag{
Name: "driver-config",
Usage: "path to test driver config file",
Required: true,
},
),
cli.StringFlag{
Name: "reportPath, path",
Usage: "path to folder where reports will be created (if not specified `$HOME/reports/execution_[storage-class].xml` will be used)",
},
cli.StringFlag{
Name: "focus",
Usage: "focus string(regx) what your k8s e2e tests should foucs on Ex: \"External.Storage.*\"",
},
cli.StringFlag{
Name: "focus-file",
Usage: "focus file(regx) what your k8s e2e tests should focus on Ex: 'testsuitename.go'",
},
cli.StringFlag{
Name: "config, conf, c",
Usage: "config for connecting to kubernetes",
EnvVar: "KUBECONFIG",
},
cli.StringFlag{
Name: "skip",
Usage: "skip string(regx) what your k8s e2e tests should skip Ex: '\\[Feature:|\\[Disruptive\\]'",
},
cli.StringFlag{
Name: "skip-file",
Usage: "skip file(regx) what your k8s e2e tests should skip Ex: 'testsuitename.go'",
},
cli.StringFlag{
Name: "skip-tests",
Usage: "skip unsupported tests give the file path Ex: /root/tests/skip.yaml" +
"ignore:\n" +
" - \"skip this test\"",
},
cli.StringFlag{
Name: "timeout",
Usage: "time out for kubernetes e2e command to exit default will be 1h Ex: 2h",
},
cli.StringFlag{
Name: "version",
Usage: "Kubernetes version that you want to test end-to-end tests",
Required: true,
},
},
Before: func(c *cli.Context) error {
checks := utils.Prechecks(c)
if !checks {
Expand Down

0 comments on commit 0ec9fb7

Please sign in to comment.