Skip to content

Commit

Permalink
Fixed typos
Browse files Browse the repository at this point in the history
Signed-off-by: Le Tran <[email protected]>
  • Loading branch information
Le Tran committed Sep 1, 2022
1 parent c9079e9 commit d2b5c7e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion pkg/blockstorage/azure/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func getCredConfig(env azure.Environment, config map[string]string) (auth.Client
return auth.ClientCredentialsConfig{}, errors.New("Cannot get clientID from config")
}

clientSecret, ok := config[blockstorage.AzureClentSecret]
clientSecret, ok := config[blockstorage.AzureClientSecret]
if !ok {
return auth.ClientCredentialsConfig{}, errors.New("Cannot get clientSecret from config")
}
Expand Down
24 changes: 12 additions & 12 deletions pkg/blockstorage/azure/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func (s *ClientSuite) TestClient(c *C) {
config := make(map[string]string)
config[blockstorage.AzureSubscriptionID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureSubscriptionID)
config[blockstorage.AzureTenantID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureTenantID)
config[blockstorage.AzureCientID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCientID)
config[blockstorage.AzureClentSecret] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClentSecret)
config[blockstorage.AzureClientID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClientID)
config[blockstorage.AzureClientSecret] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClientSecret)
config[blockstorage.AzureResurceGroup] = envconfig.GetEnvOrSkip(c, blockstorage.AzureResurceGroup)
config[blockstorage.AzureCloudEnvironmentID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCloudEnvironmentID)
azCli, err := NewClient(context.Background(), config)
Expand All @@ -62,8 +62,8 @@ func (s ClientSuite) TestGetRegions(c *C) {
config := map[string]string{}
config[blockstorage.AzureSubscriptionID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureSubscriptionID)
config[blockstorage.AzureTenantID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureTenantID)
config[blockstorage.AzureCientID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCientID)
config[blockstorage.AzureClentSecret] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClentSecret)
config[blockstorage.AzureClientID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClientID)
config[blockstorage.AzureClientSecret] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClientSecret)
config[blockstorage.AzureResurceGroup] = envconfig.GetEnvOrSkip(c, blockstorage.AzureResurceGroup)
// config[blockstorage.AzureCloudEnviornmentID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCloudEnviornmentID)

Expand Down Expand Up @@ -96,8 +96,8 @@ func (s *ClientSuite) TestGetCredConfig(c *C) {
env: azure.PublicCloud,
config: map[string]string{
blockstorage.AzureTenantID: "atid",
blockstorage.AzureCientID: "acid",
blockstorage.AzureClentSecret: "acs",
blockstorage.AzureClientID: "acid",
blockstorage.AzureClientSecret: "acs",
blockstorage.AzureActiveDirEndpoint: "aade",
blockstorage.AzureActiveDirResourceID: "aadrid",
},
Expand All @@ -113,9 +113,9 @@ func (s *ClientSuite) TestGetCredConfig(c *C) {
{
env: azure.PublicCloud,
config: map[string]string{
blockstorage.AzureTenantID: "atid",
blockstorage.AzureCientID: "acid",
blockstorage.AzureClentSecret: "acs",
blockstorage.AzureTenantID: "atid",
blockstorage.AzureClientID: "acid",
blockstorage.AzureClientSecret: "acs",
},
expCCC: auth.ClientCredentialsConfig{
ClientID: "acid",
Expand All @@ -130,8 +130,8 @@ func (s *ClientSuite) TestGetCredConfig(c *C) {
env: azure.USGovernmentCloud,
config: map[string]string{
blockstorage.AzureTenantID: "atid",
blockstorage.AzureCientID: "acid",
blockstorage.AzureClentSecret: "acs",
blockstorage.AzureClientID: "acid",
blockstorage.AzureClientSecret: "acs",
blockstorage.AzureActiveDirEndpoint: "",
blockstorage.AzureActiveDirResourceID: "",
},
Expand All @@ -148,7 +148,7 @@ func (s *ClientSuite) TestGetCredConfig(c *C) {
env: azure.USGovernmentCloud,
config: map[string]string{
blockstorage.AzureTenantID: "atid",
blockstorage.AzureCientID: "acid",
blockstorage.AzureClientID: "acid",
},
errChecker: NotNil,
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/blockstorage/blockstorage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ func (s *BlockStorageProviderSuite) getConfig(c *C, region string) map[string]st
case blockstorage.TypeAD:
config[blockstorage.AzureSubscriptionID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureSubscriptionID)
config[blockstorage.AzureTenantID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureTenantID)
config[blockstorage.AzureCientID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCientID)
config[blockstorage.AzureClentSecret] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClentSecret)
config[blockstorage.AzureClientID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClientID)
config[blockstorage.AzureClientSecret] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClientSecret)
config[blockstorage.AzureResurceGroup] = envconfig.GetEnvOrSkip(c, blockstorage.AzureResurceGroup)
config[blockstorage.AzureCloudEnvironmentID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCloudEnvironmentID)
s.args[blockstorage.AzureMigrateStorageAccount] = envconfig.GetEnvOrSkip(c, blockstorage.AzureMigrateStorageAccount)
Expand Down
4 changes: 2 additions & 2 deletions pkg/blockstorage/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const (
AzureStorageKey = "AZURE_STORAGE_ACCOUNT_KEY"
AzureSubscriptionID = "AZURE_SUBSCRIPTION_ID"
AzureTenantID = "AZURE_TENANT_ID"
AzureCientID = "AZURE_CLIENT_ID"
AzureClentSecret = "AZURE_CLIENT_SECRET"
AzureClientID = "AZURE_CLIENT_ID"
AzureClientSecret = "AZURE_CLIENT_SECRET"
AzureResurceGroup = "AZURE_RESOURCE_GROUP"
AzureResurceMgrEndpoint = "AZURE_RESOURCE_MANAGER_ENDPOINT"
AzureMigrateStorageAccount = "AZURE_MIGRATE_STORAGE_ACCOUNT_NAME"
Expand Down

0 comments on commit d2b5c7e

Please sign in to comment.