Skip to content

Commit

Permalink
integration changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KshitijaKakde committed Dec 2, 2024
1 parent 40d4d12 commit 6a34c35
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions service/service_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ func TestGetVolSize(t *testing.T) {
{
// Requesting a size of 8.5 GiB to test rounding up
cr: &csi.CapacityRange{
RequiredBytes: int64(8.5 * float64(bytesInGiB)),
RequiredBytes: int64(48.8 * float64(bytesInGiB)),

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)

Check failure on line 119 in service/service_unit_test.go

View workflow job for this annotation

GitHub Actions / Golang Validation / Lint golang code

cannot convert 48.8 * float64(bytesInGiB) (constant 5.23986e+10 of type float64) to type int64 (typecheck)
LimitBytes: 0,
},
sizeKiB: 16 * kiBytesInGiB,
sizeKiB: 56 * kiBytesInGiB,
},
}

Expand Down
9 changes: 9 additions & 0 deletions test/integration/features/integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ Feature: VxFlex OS CSI interface
And when I call DeleteVolume
Then there are no errors

Scenario: Create and delete basic volume with float size
Given a VxFlexOS service
And a basic block volume request "integration1" "48.1"
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 volume
Given a VxFlexOS service
And a basic block volume request "integration2" "8"
Expand Down
6 changes: 3 additions & 3 deletions test/integration/step_defs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func (f *feature) aVxFlexOSService() error {
return nil
}

func (f *feature) aBasicBlockVolumeRequest(name string, size int64) error {
func (f *feature) aBasicBlockVolumeRequest(name string, size float64) error {
req := new(csi.CreateVolumeRequest)
storagePool := os.Getenv("STORAGE_POOL")
params := make(map[string]string)
Expand All @@ -344,7 +344,7 @@ func (f *feature) aBasicBlockVolumeRequest(name string, size int64) error {
makeAUniqueName(&name)
req.Name = name
capacityRange := new(csi.CapacityRange)
capacityRange.RequiredBytes = size * 1024 * 1024 * 1024
capacityRange.RequiredBytes = int64(math.Ceil(size * 1024 * 1024 * 1024))
req.CapacityRange = capacityRange
capability := new(csi.VolumeCapability)
block := new(csi.VolumeCapability_BlockVolume)
Expand Down Expand Up @@ -2737,7 +2737,7 @@ func (f *feature) checkNFS(_ context.Context, systemID string) (bool, error) {
func FeatureContext(s *godog.ScenarioContext) {
f := &feature{}
s.Step(`^a VxFlexOS service$`, f.aVxFlexOSService)
s.Step(`^a basic block volume request "([^"]*)" "(\d+)"$`, f.aBasicBlockVolumeRequest)
s.Step(`^a basic block volume request "([^"]*)" "(\d+(\.\d+)?)"$`, f.aBasicBlockVolumeRequest)
s.Step(`^Set System Name As "([^"]*)"$`, f.iSetSystemName)
s.Step(`^Set Bad AllSystemNames$`, f.iSetBadAllSystemNames)
s.Step(`^I call CreateVolume$`, f.iCallCreateVolume)
Expand Down

0 comments on commit 6a34c35

Please sign in to comment.