Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAULT-28281: Pass in accountName variable into validation function #27563

Merged
merged 6 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/27563.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
storage/azure: Fix invalid account name initialization bug
```
4 changes: 2 additions & 2 deletions physical/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion physical/azure/azure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Expand Down
Loading