Add comprehensive test coverage and fix empty branch issue

This commit is contained in:
2025-05-29 14:18:39 -07:00
parent a4d7225036
commit 85d7ef21eb
6 changed files with 856 additions and 10 deletions

View File

@@ -21,13 +21,16 @@ type Vault struct {
}
// NewVault creates a new Vault instance
func NewVault(fs afero.Fs, name string, stateDir string) *Vault {
return &Vault{
func NewVault(fs afero.Fs, stateDir string, name string) *Vault {
secret.Debug("Creating NewVault instance")
v := &Vault{
Name: name,
fs: fs,
stateDir: stateDir,
longTermKey: nil,
}
secret.Debug("Created NewVault instance successfully")
return v
}
// Locked returns true if the vault doesn't have a long-term key in memory