@@ -33,7 +33,6 @@ import (
33
33
"k8s.io/apimachinery/pkg/util/wait"
34
34
"k8s.io/utils/pointer"
35
35
"sigs.k8s.io/blob-csi-driver/pkg/util"
36
- "sigs.k8s.io/cloud-provider-azure/pkg/azclient"
37
36
"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/blobclient"
38
37
"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/mockstorageaccountclient"
39
38
azure "sigs.k8s.io/cloud-provider-azure/pkg/provider"
@@ -1665,6 +1664,7 @@ func TestCopyVolume(t *testing.T) {
1665
1664
name : "AADClientSecret shouldn't be nil or useManagedIdentityExtension must be set to true when accountSASToken is empty" ,
1666
1665
testFunc : func (t * testing.T ) {
1667
1666
d := NewFakeDriver ()
1667
+ d .cloud = & azure.Cloud {}
1668
1668
mp := map [string ]string {}
1669
1669
1670
1670
volumeSource := & csi.VolumeContentSource_VolumeSource {
@@ -1888,13 +1888,9 @@ func Test_authorizeAzcopyWithIdentity(t *testing.T) {
1888
1888
d .cloud = & azure.Cloud {
1889
1889
Config : azure.Config {
1890
1890
AzureAuthConfig : config.AzureAuthConfig {
1891
- ARMClientConfig : azclient.ARMClientConfig {
1892
- TenantID : "TenantID" ,
1893
- },
1894
- AzureAuthConfig : azclient.AzureAuthConfig {
1895
- AADClientID : "AADClientID" ,
1896
- AADClientSecret : "AADClientSecret" ,
1897
- },
1891
+ TenantID : "TenantID" ,
1892
+ AADClientID : "AADClientID" ,
1893
+ AADClientSecret : "AADClientSecret" ,
1898
1894
},
1899
1895
},
1900
1896
}
@@ -1918,12 +1914,8 @@ func Test_authorizeAzcopyWithIdentity(t *testing.T) {
1918
1914
d .cloud = & azure.Cloud {
1919
1915
Config : azure.Config {
1920
1916
AzureAuthConfig : config.AzureAuthConfig {
1921
- ARMClientConfig : azclient.ARMClientConfig {
1922
- TenantID : "TenantID" ,
1923
- },
1924
- AzureAuthConfig : azclient.AzureAuthConfig {
1925
- AADClientSecret : "AADClientSecret" ,
1926
- },
1917
+ TenantID : "TenantID" ,
1918
+ AADClientSecret : "AADClientSecret" ,
1927
1919
},
1928
1920
},
1929
1921
}
@@ -1942,10 +1934,8 @@ func Test_authorizeAzcopyWithIdentity(t *testing.T) {
1942
1934
d .cloud = & azure.Cloud {
1943
1935
Config : azure.Config {
1944
1936
AzureAuthConfig : config.AzureAuthConfig {
1945
- AzureAuthConfig : azclient.AzureAuthConfig {
1946
- UseManagedIdentityExtension : true ,
1947
- UserAssignedIdentityID : "UserAssignedIdentityID" ,
1948
- },
1937
+ UseManagedIdentityExtension : true ,
1938
+ UserAssignedIdentityID : "UserAssignedIdentityID" ,
1949
1939
},
1950
1940
},
1951
1941
}
@@ -1967,9 +1957,7 @@ func Test_authorizeAzcopyWithIdentity(t *testing.T) {
1967
1957
d .cloud = & azure.Cloud {
1968
1958
Config : azure.Config {
1969
1959
AzureAuthConfig : config.AzureAuthConfig {
1970
- AzureAuthConfig : azclient.AzureAuthConfig {
1971
- UseManagedIdentityExtension : true ,
1972
- },
1960
+ UseManagedIdentityExtension : true ,
1973
1961
},
1974
1962
},
1975
1963
}
@@ -2039,9 +2027,7 @@ func Test_getSASToken(t *testing.T) {
2039
2027
d .cloud = & azure.Cloud {
2040
2028
Config : azure.Config {
2041
2029
AzureAuthConfig : config.AzureAuthConfig {
2042
- AzureAuthConfig : azclient.AzureAuthConfig {
2043
- UseManagedIdentityExtension : true ,
2044
- },
2030
+ UseManagedIdentityExtension : true ,
2045
2031
},
2046
2032
},
2047
2033
}
@@ -2073,9 +2059,7 @@ func Test_getSASToken(t *testing.T) {
2073
2059
d .cloud = & azure.Cloud {
2074
2060
Config : azure.Config {
2075
2061
AzureAuthConfig : config.AzureAuthConfig {
2076
- AzureAuthConfig : azclient.AzureAuthConfig {
2077
- UseManagedIdentityExtension : true ,
2078
- },
2062
+ UseManagedIdentityExtension : true ,
2079
2063
},
2080
2064
},
2081
2065
}
0 commit comments