Other: Fix flaky cookies test

This commit is contained in:
James Houlahan
2022-10-11 19:40:28 +02:00
parent 14a578f319
commit 1c922ca083
16 changed files with 379 additions and 240 deletions

View File

@ -15,11 +15,6 @@ import (
"github.com/bradenaw/juniper/xslices"
)
var (
ErrInsecure = errors.New("the vault is insecure")
ErrCorrupt = errors.New("the vault is corrupt")
)
type Vault struct {
path string
enc []byte
@ -122,6 +117,10 @@ func (vault *Vault) DeleteUser(userID string) error {
})
}
func (vault *Vault) Close() error {
return nil
}
func newVault(path, gluonDir string, gcm cipher.AEAD) (*Vault, bool, error) {
if _, err := os.Stat(path); errors.Is(err, fs.ErrNotExist) {
if _, err := initVault(path, gluonDir, gcm); err != nil {