Skip to content

Commit

Permalink
Fix UT
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshaySainiDell committed Nov 25, 2024
1 parent 84d7f67 commit 0e29736
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 5 additions & 4 deletions service/features/migration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ Feature: PowerMax CSI Interface
And I call ArrayMigrate with <actionvalue>
And the error contains <errormsg>
Examples:
| actionvalue | errormsg |
| "csimgr.ActionTypes_MG_MIGRATE" | "none" |
| "csimgr.ActionTypes_MG_COMMIT" | "none" |
| "" | "none" |
| actionvalue | errormsg |
| "csimgr.ActionTypes_MG_MIGRATE" | "failed to create array migration environment for target array" |
| "csimgr.ActionTypes_MG_COMMIT" | "Not Found" |
| "" | "Invalid action" |

10 changes: 9 additions & 1 deletion service/step_defs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ ip6t_rpfilter 12595 1
svc.fcConnector = &mockFCGobrick{}
svc.iscsiConnector = &mockISCSIGobrick{}
svc.nvmetcpClient = &gonvme.MockNVMe{}
svc.nvmeTCPConnector = &mockNVMeTCPConnector{}
svc.dBusConn = &mockDbusConnection{}
svc.k8sUtils = k8smock.Init()
mockGobrickReset()
Expand Down Expand Up @@ -3567,6 +3568,10 @@ func (f *feature) iSetTransportProtocolTo(protocol string) error {
f.service.useNVMeTCP = false
f.service.useFC = false
f.service.useIscsi = true
case "NVME":
f.service.useNVMeTCP = true
f.service.useFC = false
f.service.useIscsi = false
}
f.service.opts.TransportProtocol = protocol
return nil
Expand Down Expand Up @@ -4827,7 +4832,10 @@ func (f *feature) iCallArrayMigrate(actionvalue string) error {
SymmetrixIDParam: mock.DefaultSymmetrixID,
RemoteSymIDParam: mock.DefaultRemoteSymID,
},
ActionTypes: iActionValue(actionvalue),
}
action := iActionValue(actionvalue)
if action != nil {
req.ActionTypes = action
}

f.arrayMigrateResponse, f.err = f.service.ArrayMigrate(ctx, req)
Expand Down

0 comments on commit 0e29736

Please sign in to comment.