mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
VAULT-28281: Pass in accountName variable into validation function (#27563)
* pass in correct accountName variable into validation function * modify test fixture to better test validation functionality * pass in accountName variable into error message * changelog
This commit is contained in:
parent
7187b6f2c3
commit
45682dc090
3 changed files with 6 additions and 3 deletions
3
changelog/27563.txt
Normal file
3
changelog/27563.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
storage/azure: Fix invalid account name initialization bug
|
||||
```
|
||||
|
|
@ -68,8 +68,8 @@ func NewAzureBackend(conf map[string]string, logger log.Logger) (physical.Backen
|
|||
return nil, fmt.Errorf("'accountName' must be set")
|
||||
}
|
||||
}
|
||||
if err := validateAccountName(name); err != nil {
|
||||
return nil, fmt.Errorf("invalid account name %s: %w", name, err)
|
||||
if err := validateAccountName(accountName); err != nil {
|
||||
return nil, fmt.Errorf("invalid account name %s: %w", accountName, err)
|
||||
}
|
||||
|
||||
accountKey := os.Getenv("AZURE_ACCOUNT_KEY")
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ func testFixture(t *testing.T) (*AzureBackend, func()) {
|
|||
t.Helper()
|
||||
|
||||
ts := time.Now().UnixNano()
|
||||
name := fmt.Sprintf("vlt%d", ts)
|
||||
name := fmt.Sprintf("vlt-%d", ts)
|
||||
_ = os.Setenv("AZURE_BLOB_CONTAINER", name)
|
||||
|
||||
cleanup := func() {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue