Store remote sync bindings in vault data

This commit is contained in:
Joe Julian
2026-04-06 11:32:04 -07:00
parent 32c7b49f4f
commit 5e1e9f82fb
4 changed files with 196 additions and 2 deletions
+14 -2
View File
@@ -4411,7 +4411,13 @@ func TestShowLocalVaultChooser(t *testing.T) {
func TestShowRemoteConnectionChooser(t *testing.T) {
t.Parallel()
u := newUIWithSession("desktop", &session.Manager{})
dir := t.TempDir()
u := newUIWithState("desktop", &session.Manager{}, statePaths{
DefaultSaveAsPath: filepath.Join(dir, "vault.kdbx"),
RecentVaultsPath: filepath.Join(dir, "recent-vaults.json"),
RecentRemotesPath: filepath.Join(dir, "recent-remotes.json"),
UIPreferencesPath: filepath.Join(dir, "ui-prefs.json"),
})
u.lifecycleMode = "remote"
u.remoteBaseURL.SetText("")
u.remotePath.SetText("")
@@ -4442,7 +4448,13 @@ func TestShowRemoteConnectionChooser(t *testing.T) {
func TestApplyingRecentRemoteRecordMarksSelectedRemoteConnection(t *testing.T) {
t.Parallel()
u := newUIWithSession("desktop", &session.Manager{})
dir := t.TempDir()
u := newUIWithState("desktop", &session.Manager{}, statePaths{
DefaultSaveAsPath: filepath.Join(dir, "vault.kdbx"),
RecentVaultsPath: filepath.Join(dir, "recent-vaults.json"),
RecentRemotesPath: filepath.Join(dir, "recent-remotes.json"),
UIPreferencesPath: filepath.Join(dir, "ui-prefs.json"),
})
if u.hasSelectedRemoteTarget() {
t.Fatal("hasSelectedRemoteTarget() = true, want false before selecting a saved remote connection")
}