From 2a1a8f046e8d2bfe684ebec76de8f0028ee66228 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Wed, 11 Nov 2026 20:03:39 +0100 Subject: [PATCH] protondrive: restore rclone's config storage after the password test TestPasswordStoredObscured installed the config file storage for its temporary config and left it in place for the tests after it. Co-Authored-By: Claude Opus 5.5 --- backend/protondrive/security_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/protondrive/security_test.go b/backend/protondrive/security_test.go index 3575684d5..500c41377 100644 --- a/backend/protondrive/security_test.go +++ b/backend/protondrive/security_test.go @@ -684,10 +684,14 @@ func TestPasswordStoredObscured(t *testing.T) { const password, mailboxPassword = "stored-Hunter2-1a2b3c", "stored-mailbox-4d5e6f" srv := protontest.New(t) srv.AddTwoPasswordUser("user", password, mailboxPassword) - oldPath := config.GetConfigPath() + oldPath, oldData := config.GetConfigPath(), config.Data() path := filepath.Join(t.TempDir(), "rclone.conf") require.NoError(t, config.SetConfigPath(path)) - t.Cleanup(func() { _ = config.SetConfigPath(oldPath) }) + t.Cleanup(func() { + assert.NoError(t, config.SetConfigPath(oldPath)) + config.SetData(oldData) + assert.True(t, config.Data() == oldData, "the config storage isn't restored") + }) configfile.Install() // As "rclone config create obscured protondrive ... --obscure".