feat(GODT-2500): Add panic handlers everywhere.

This commit is contained in:
Jakub
2023-03-22 17:18:17 +01:00
parent 9f59e61b14
commit ec92c918cd
42 changed files with 283 additions and 130 deletions

View File

@ -25,6 +25,7 @@ import (
"path/filepath"
"testing"
"github.com/ProtonMail/gluon/queue"
"github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/stretchr/testify/require"
"github.com/vmihailenco/msgpack/v5"
@ -52,7 +53,7 @@ func TestMigrate(t *testing.T) {
require.NoError(t, os.WriteFile(filepath.Join(dir, "vault.enc"), b, 0o600))
// Migrate the vault.
s, corrupt, err := New(dir, "default-gluon-dir", []byte("my secret key"))
s, corrupt, err := New(dir, "default-gluon-dir", []byte("my secret key"), queue.NoopPanicHandler{})
require.NoError(t, err)
require.False(t, corrupt)