feat(cli): two-key role routing + init bootstrap
openStore(role) selects the DEK wrap slot; admin commands require EMCLI_ADMIN_KEY (admin slot only, no agent fallback); init writes both slots from both keys. Test helpers seed the wrap slots. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,10 +11,13 @@ import (
|
||||
|
||||
func doctorDeps(t *testing.T, accounts []store.Account, imap, smtp func(store.Account) error) (Deps, *[]byte) {
|
||||
t.Helper()
|
||||
st, err := store.Open(filepath.Join(t.TempDir(), "e.db"), testKey())
|
||||
st, err := store.Open(filepath.Join(t.TempDir(), "e.db"))
|
||||
if err != nil {
|
||||
t.Fatalf("store: %v", err)
|
||||
}
|
||||
if err := st.InitKeys(testKey(), testKey()); err != nil {
|
||||
t.Fatalf("InitKeys: %v", err)
|
||||
}
|
||||
t.Cleanup(func() { st.Close() })
|
||||
for _, a := range accounts {
|
||||
if _, err := st.AddAccount(a); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user