Skip to content

Tests for raw block volumes are added #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/csi-sanity/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"flag"
"fmt"
"os"
"strings"
"time"

"github.com/kubernetes-csi/csi-test/v3/pkg/sanity"
Expand Down Expand Up @@ -78,6 +79,7 @@ func main() {
stringVar(&config.RemoveStagingPathCmd, "removestagingpathcmd", "Command to run for staging path removal")
durationVar(&config.RemovePathCmdTimeout, "removepathcmdtimeout", "Timeout for the commands to remove target and staging paths, in seconds")
stringVar(&config.SecretsFile, "secrets", "CSI secrets file")
stringVar(&config.TestVolumeAccessType, "testvolumeaccesstype", "Volume capability access type, valid values are mount or block")
int64Var(&config.TestVolumeSize, "testvolumesize", "Base volume size used for provisioned volumes")
int64Var(&config.TestVolumeExpandSize, "testvolumeexpandsize", "Target size for expanded volumes")
stringVar(&config.TestVolumeParametersFile, "testvolumeparameters", "YAML file of volume parameters for provisioned volumes")
Expand All @@ -94,6 +96,10 @@ func main() {
fmt.Printf("--%sendpoint must be provided with an CSI endpoint\n", prefix)
os.Exit(1)
}
if at := strings.TrimSpace(strings.ToLower(config.TestVolumeAccessType)); !(at == "mount" || at == "block") {
fmt.Printf("--%stestvolumeaccesstype valid values are mount or block\n", prefix)
os.Exit(1)
}

t := testing{}
sanity.Test(&t, config)
Expand Down
Loading