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:
@@ -13,10 +13,13 @@ import (
|
||||
// mailer (for reply-to). The named account is created per the supplied template.
|
||||
func sendDeps(t *testing.T, acc store.Account, fm *fakeMailer) (Deps, *[]mail.OutgoingMessage, *[]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() })
|
||||
if _, err := st.AddAccount(acc); err != nil {
|
||||
t.Fatalf("AddAccount: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user