From 1da78c4924ee6f6fe11b4df0ceb166bbf26943f6 Mon Sep 17 00:00:00 2001 From: ashleyvjoy <110008193+ashleyvjoy@users.noreply.github.com> Date: Tue, 2 May 2023 20:01:19 +0530 Subject: [PATCH] making one signed commit (#187) --- test/integration/features/integration.feature | 45 +++++++++++++++++++ test/integration/step_defs_test.go | 30 ++++++++++--- 2 files changed, 68 insertions(+), 7 deletions(-) diff --git a/test/integration/features/integration.feature b/test/integration/features/integration.feature index 4eba8c01..7b949330 100644 --- a/test/integration/features/integration.feature +++ b/test/integration/features/integration.feature @@ -505,6 +505,51 @@ Feature: VxFlex OS CSI interface And when I call DeleteVolume Then there are no errors + Scenario: Create and delete basic nfs volume + Given a VxFlexOS service + And a basic nfs volume request "nfsvolume1" "8" + When I call CreateVolume + When I call ListVolume + Then a valid ListVolumeResponse is returned + And when I call DeleteVolume + Then there are no errors + + Scenario: Idempotent create and delete basic nfs volume + Given a VxFlexOS service + And a basic nfs volume request "nfsvolume2" "8" + When I call CreateVolume + And I call CreateVolume + And when I call DeleteVolume + And when I call DeleteVolume + Then there are no errors + + Scenario: Create and delete 100000G NFS volume + Given a VxFlexOS service + And max retries 1 + And a basic nfs volume request "nfsvolume2" "100000" + When I call CreateVolume + And when I call DeleteVolume + Then the error message should contain "Requested volume size exceeds the volume allocation limit" + + Scenario: Create a NFS volume with wrong NasName + Given a VxFlexOS service + And a basic nfs volume request "nfsvolume3" "8" + And I set wrongNasName + When I call CreateVolume + Then the error message should contain + Examples: + | errormsg | + | "error_msg" | + + Scenario: Create a NFS volume with wrong FileSystemName + Given a VxFlexOS service + And a basic nfs volume request "nfsvolume3" "8" + And I set wrongFileSystemName + When I call CreateVolume + Then the error message should contain + Examples: + | errormsg | + | "error_msg" | Scenario Outline: Publish and Unpublish Ephemeral Volume Given a VxFlexOS service diff --git a/test/integration/step_defs_test.go b/test/integration/step_defs_test.go index 327a3ef4..4663f199 100644 --- a/test/integration/step_defs_test.go +++ b/test/integration/step_defs_test.go @@ -51,13 +51,15 @@ const ( // ArrayConnectionData contains data required to connect to array type ArrayConnectionData struct { - SystemID string `json:"systemID"` - Username string `json:"username"` - Password string `json:"password"` - Endpoint string `json:"endpoint"` - Insecure bool `json:"insecure,omitempty"` - IsDefault bool `json:"isDefault,omitempty"` - AllSystemNames string `json:"allSystemNames"` + SystemID string `json:"systemID"` + Username string `json:"username"` + Password string `json:"password"` + Endpoint string `json:"endpoint"` + Insecure bool `json:"insecure,omitempty"` + IsDefault bool `json:"isDefault,omitempty"` + AllSystemNames string `json:"allSystemNames"` + NasName *string `json:"nasname"` + NfsAcls string `json:"nfsAcls"` } type feature struct { @@ -1733,6 +1735,19 @@ func (f *feature) restCallToSetName(auth string, url string, name string) (strin return "", nil } +func (f *feature) iSetBadNasName() error { + //wip + for _, a := range f.arrays { + if a.NasName != nil { + badNasName := "badNas" + a.NasName = &badNasName + fmt.Printf("set bad NasName done \n") + return nil + } + } + return fmt.Errorf("Error during set bad NasName") +} + func FeatureContext(s *godog.ScenarioContext) { f := &feature{} s.Step(`^a VxFlexOS service$`, f.aVxFlexOSService) @@ -1793,4 +1808,5 @@ func FeatureContext(s *godog.ScenarioContext) { s.Step(`^the volumecondition is "([^"]*)"$`, f.theVolumeconditionIs) s.Step(`^I call NodeGetVolumeStats$`, f.iCallNodeGetVolumeStats) s.Step(`^the VolumeCondition is "([^"]*)"$`, f.theVolumeConditionIs) + s.Step(`^I set wrongNasName$`, f.iSetBadNasName) }