Skip to content

Commit

Permalink
making one signed commit (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyvjoy authored May 2, 2023
1 parent d385858 commit 1da78c4
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 7 deletions.
45 changes: 45 additions & 0 deletions test/integration/features/integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 <errormsg>
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 <errormsg>
Examples:
| errormsg |
| "error_msg" |

Scenario Outline: Publish and Unpublish Ephemeral Volume
Given a VxFlexOS service
Expand Down
30 changes: 23 additions & 7 deletions test/integration/step_defs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}

0 comments on commit 1da78c4

Please sign in to comment.