@@ -16,10 +16,8 @@ import (
16
16
"github.com/golang/mock/gomock"
17
17
"github.com/stretchr/testify/assert"
18
18
19
- "github.com/netapp/trident/acp"
20
19
tridentconfig "github.com/netapp/trident/config"
21
20
. "github.com/netapp/trident/logging"
22
- "github.com/netapp/trident/mocks/mock_acp"
23
21
mockapi "github.com/netapp/trident/mocks/mock_storage_drivers/mock_ontap"
24
22
"github.com/netapp/trident/storage"
25
23
sa "github.com/netapp/trident/storage_attribute"
@@ -1699,12 +1697,6 @@ func TestOntapSanEconomyVolumeClone_BothQosPolicy(t *testing.T) {
1699
1697
func TestOntapSanEconomyVolumeImport (t * testing.T ) {
1700
1698
mockAPI , d := newMockOntapSanEcoDriver (t )
1701
1699
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
-
1708
1700
volConfig := & storage.VolumeConfig {
1709
1701
Size : "1g" ,
1710
1702
Encryption : "false" ,
@@ -1824,12 +1816,6 @@ func TestOntapSanEconomyVolumeImport(t *testing.T) {
1824
1816
func TestOntapSanEconomyVolumeImport_Managed (t * testing.T ) {
1825
1817
mockAPI , d := newMockOntapSanEcoDriver (t )
1826
1818
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
-
1833
1819
volConfig := & storage.VolumeConfig {
1834
1820
InternalName : "my_vol/my_LUN" ,
1835
1821
Size : "1g" ,
@@ -1930,29 +1916,9 @@ func TestOntapSanEconomyVolumeImport_Managed(t *testing.T) {
1930
1916
}
1931
1917
}
1932
1918
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
-
1947
1919
func TestOntapSanEconomyVolumeImport_UnsupportedNameLength (t * testing.T ) {
1948
1920
mockAPI , d := newMockOntapSanEcoDriver (t )
1949
1921
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
-
1956
1922
volConfig := & storage.VolumeConfig {
1957
1923
InternalName : "my_vol" +
1958
1924
"/VOLUME_NAME_BIGGER_THAN_SUPPORTED_LENGTH_wsvawgwasvsdgadsfbadsvadsfhbadvbsDFASBsdvsvsdvsdvsvs" +
0 commit comments