@@ -16,10 +16,8 @@ import (
1616 "github.com/golang/mock/gomock"
1717 "github.com/stretchr/testify/assert"
1818
19- "github.com/netapp/trident/acp"
2019 tridentconfig "github.com/netapp/trident/config"
2120 . "github.com/netapp/trident/logging"
22- "github.com/netapp/trident/mocks/mock_acp"
2321 mockapi "github.com/netapp/trident/mocks/mock_storage_drivers/mock_ontap"
2422 "github.com/netapp/trident/storage"
2523 sa "github.com/netapp/trident/storage_attribute"
@@ -1699,12 +1697,6 @@ func TestOntapSanEconomyVolumeClone_BothQosPolicy(t *testing.T) {
16991697func TestOntapSanEconomyVolumeImport (t * testing.T ) {
17001698 mockAPI , d := newMockOntapSanEcoDriver (t )
17011699
1702- mockController := gomock .NewController (t )
1703- mockACP := mock_acp .NewMockTridentACP (mockController )
1704- acp .SetAPI (mockACP )
1705- // Mock out any expected calls on the ACP API.
1706- mockACP .EXPECT ().IsFeatureEnabled (gomock .Any (), acp .FeatureSANEconomyVolumeImport ).Return (nil ).AnyTimes ()
1707-
17081700 volConfig := & storage.VolumeConfig {
17091701 Size : "1g" ,
17101702 Encryption : "false" ,
@@ -1824,12 +1816,6 @@ func TestOntapSanEconomyVolumeImport(t *testing.T) {
18241816func TestOntapSanEconomyVolumeImport_Managed (t * testing.T ) {
18251817 mockAPI , d := newMockOntapSanEcoDriver (t )
18261818
1827- mockController := gomock .NewController (t )
1828- mockACP := mock_acp .NewMockTridentACP (mockController )
1829- acp .SetAPI (mockACP )
1830- // Mock out any expected calls on the ACP API.
1831- mockACP .EXPECT ().IsFeatureEnabled (gomock .Any (), acp .FeatureSANEconomyVolumeImport ).Return (nil ).AnyTimes ()
1832-
18331819 volConfig := & storage.VolumeConfig {
18341820 InternalName : "my_vol/my_LUN" ,
18351821 Size : "1g" ,
@@ -1930,29 +1916,9 @@ func TestOntapSanEconomyVolumeImport_Managed(t *testing.T) {
19301916 }
19311917}
19321918
1933- func TestOntapSanEconomyVolumeImport_Unsupported (t * testing.T ) {
1934- mockController := gomock .NewController (t )
1935- mockACP := mock_acp .NewMockTridentACP (mockController )
1936- acp .SetAPI (mockACP )
1937- // Mock out any expected calls on the ACP API.
1938- mockACP .EXPECT ().IsFeatureEnabled (gomock .Any (), acp .FeatureSANEconomyVolumeImport ).
1939- Return (utilserrors .UnsupportedError ("unsupported" ))
1940-
1941- volConfig := & storage.VolumeConfig {}
1942- _ , d := newMockOntapSanEcoDriver (t )
1943- err := d .Import (ctx , volConfig , "testvol" )
1944- assert .Error (t , err , "Import is supported" )
1945- }
1946-
19471919func TestOntapSanEconomyVolumeImport_UnsupportedNameLength (t * testing.T ) {
19481920 mockAPI , d := newMockOntapSanEcoDriver (t )
19491921
1950- mockController := gomock .NewController (t )
1951- mockACP := mock_acp .NewMockTridentACP (mockController )
1952- acp .SetAPI (mockACP )
1953- // Mock out any expected calls on the ACP API.
1954- mockACP .EXPECT ().IsFeatureEnabled (gomock .Any (), acp .FeatureSANEconomyVolumeImport ).Return (nil ).AnyTimes ()
1955-
19561922 volConfig := & storage.VolumeConfig {
19571923 InternalName : "my_vol" +
19581924 "/VOLUME_NAME_BIGGER_THAN_SUPPORTED_LENGTH_wsvawgwasvsdgadsfbadsvadsfhbadvbsDFASBsdvsvsdvsdvsvs" +
0 commit comments