@@ -21,10 +21,10 @@ import (
2121 mockcore "github.com/netapp/trident/mocks/mock_core"
2222 mockControllerAPI "github.com/netapp/trident/mocks/mock_frontend/mock_csi/mock_controller_api"
2323 mockNodeHelpers "github.com/netapp/trident/mocks/mock_frontend/mock_csi/mock_node_helpers"
24- mockUtils "github.com/netapp/trident/mocks/mock_utils"
2524 "github.com/netapp/trident/mocks/mock_utils/mock_devices"
2625 "github.com/netapp/trident/mocks/mock_utils/mock_iscsi"
2726 "github.com/netapp/trident/mocks/mock_utils/mock_mount"
27+ mock_nvme "github.com/netapp/trident/mocks/mock_utils/nvme"
2828 "github.com/netapp/trident/pkg/collection"
2929 "github.com/netapp/trident/pkg/convert"
3030 sa "github.com/netapp/trident/storage_attribute"
@@ -35,6 +35,7 @@ import (
3535 "github.com/netapp/trident/utils/iscsi"
3636 "github.com/netapp/trident/utils/models"
3737 "github.com/netapp/trident/utils/mount"
38+ "github.com/netapp/trident/utils/nvme"
3839 "github.com/netapp/trident/utils/osutils"
3940)
4041
@@ -1543,22 +1544,22 @@ func TestUpdateNodePublicationState_SuccessfullyUpdatesNodeAsCleaned(t *testing.
15431544
15441545func TestPerformNVMeSelfHealing (t * testing.T ) {
15451546 mockCtrl := gomock .NewController (t )
1546- mockNVMeHandler := mockUtils .NewMockNVMeInterface (mockCtrl )
1547+ mockNVMeHandler := mock_nvme .NewMockNVMeInterface (mockCtrl )
15471548 nodeServer := & Plugin {nvmeHandler : mockNVMeHandler }
15481549
15491550 // Empty Published sessions case.
15501551 nodeServer .performNVMeSelfHealing (ctx )
15511552
15521553 // Error populating current sessions.
1553- publishedNVMeSessions .AddNVMeSession (utils .NVMeSubsystem {NQN : "nqn" }, []string {})
1554+ publishedNVMeSessions .AddNVMeSession (nvme .NVMeSubsystem {NQN : "nqn" }, []string {})
15541555 mockNVMeHandler .EXPECT ().PopulateCurrentNVMeSessions (ctx , gomock .Any ()).
15551556 Return (errors .New ("failed to populate current sessions" ))
15561557
15571558 nodeServer .performNVMeSelfHealing (ctx )
15581559
15591560 // Self-healing process done.
15601561 mockNVMeHandler .EXPECT ().PopulateCurrentNVMeSessions (ctx , gomock .Any ()).Return (nil )
1561- mockNVMeHandler .EXPECT ().InspectNVMeSessions (ctx , gomock .Any (), gomock .Any ()).Return ([]utils .NVMeSubsystem {})
1562+ mockNVMeHandler .EXPECT ().InspectNVMeSessions (ctx , gomock .Any (), gomock .Any ()).Return ([]nvme .NVMeSubsystem {})
15621563
15631564 nodeServer .performNVMeSelfHealing (ctx )
15641565 // Cleanup of global objects.
@@ -1567,10 +1568,10 @@ func TestPerformNVMeSelfHealing(t *testing.T) {
15671568
15681569func TestFixNVMeSessions (t * testing.T ) {
15691570 mockCtrl := gomock .NewController (t )
1570- mockNVMeHandler := mockUtils .NewMockNVMeInterface (mockCtrl )
1571+ mockNVMeHandler := mock_nvme .NewMockNVMeInterface (mockCtrl )
15711572 nodeServer := & Plugin {nvmeHandler : mockNVMeHandler }
1572- subsystem1 := utils .NVMeSubsystem {NQN : "nqn1" }
1573- subsystems := []utils .NVMeSubsystem {subsystem1 }
1573+ subsystem1 := nvme .NVMeSubsystem {NQN : "nqn1" }
1574+ subsystems := []nvme .NVMeSubsystem {subsystem1 }
15741575
15751576 // Subsystem not present in published sessions case.
15761577 nodeServer .fixNVMeSessions (ctx , time .UnixMicro (0 ), subsystems )
@@ -1751,7 +1752,7 @@ func TestNodeRegisterWithController_Success(t *testing.T) {
17511752 mockCtrl := gomock .NewController (t )
17521753 mockClient := mockControllerAPI .NewMockTridentController (mockCtrl )
17531754 mockOrchestrator := mockcore .NewMockOrchestrator (mockCtrl )
1754- mockNVMeHandler := mockUtils .NewMockNVMeInterface (mockCtrl )
1755+ mockNVMeHandler := mock_nvme .NewMockNVMeInterface (mockCtrl )
17551756
17561757 iscsiClient , _ := iscsi .New ()
17571758 // Create a node server plugin
@@ -1796,7 +1797,7 @@ func TestNodeRegisterWithController_TopologyLabels(t *testing.T) {
17961797 mockCtrl := gomock .NewController (t )
17971798 mockClient := mockControllerAPI .NewMockTridentController (mockCtrl )
17981799 mockOrchestrator := mockcore .NewMockOrchestrator (mockCtrl )
1799- mockNVMeHandler := mockUtils .NewMockNVMeInterface (mockCtrl )
1800+ mockNVMeHandler := mock_nvme .NewMockNVMeInterface (mockCtrl )
18001801 iscsiClient , _ := iscsi .New ()
18011802
18021803 // Create a node server plugin
@@ -1882,7 +1883,7 @@ func TestNodeRegisterWithController_Failure(t *testing.T) {
18821883 mockCtrl := gomock .NewController (t )
18831884 mockClient := mockControllerAPI .NewMockTridentController (mockCtrl )
18841885 mockOrchestrator := mockcore .NewMockOrchestrator (mockCtrl )
1885- mockNVMeHandler := mockUtils .NewMockNVMeInterface (mockCtrl )
1886+ mockNVMeHandler := mock_nvme .NewMockNVMeInterface (mockCtrl )
18861887 iscsiClient , _ := iscsi .New ()
18871888
18881889 // Create a node server plugin
0 commit comments