From 759744a454dc4991c091b8232576db418de4f790 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Fri, 2 Jun 2023 17:46:10 +0000
Subject: [PATCH] Disable changeExternalPassword test, we can't support this
 with sync

---
 storage/password_test.go | 62 ++++++++++++++++++++--------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/storage/password_test.go b/storage/password_test.go
index 0e4c4c64..9ec472c5 100644
--- a/storage/password_test.go
+++ b/storage/password_test.go
@@ -44,37 +44,37 @@ func Test_getOrInit(t *testing.T) {
 
 // Tests that changeExternalPassword correctly changes the password and updates
 // the encryption.
-func Test_changeExternalPassword(t *testing.T) {
-	oldExternalPassword := "myPassword"
-	newExternalPassword := "hunter2"
-	oldInternalPassword, err := getOrInit(oldExternalPassword)
-	if err != nil {
-		t.Errorf("%+v", err)
-	}
-
-	err = changeExternalPassword(oldExternalPassword, newExternalPassword)
-	if err != nil {
-		t.Errorf("%+v", err)
-	}
-
-	newInternalPassword, err := getOrInit(newExternalPassword)
-	if err != nil {
-		t.Errorf("%+v", err)
-	}
-
-	if !bytes.Equal(oldInternalPassword, newInternalPassword) {
-		t.Errorf("Internal password was not changed in storage. Old and new "+
-			"should be different.\nold: %+v\nnew: %+v",
-			oldInternalPassword, newInternalPassword)
-	}
-
-	_, err = getOrInit(oldExternalPassword)
-	expectedErr := strings.Split(decryptWithPasswordErr, "%")[0]
-	if err == nil || !strings.Contains(err.Error(), expectedErr) {
-		t.Errorf("Unexpected error when trying to get internal password with "+
-			"old external password.\nexpected: %s\nreceived: %+v", expectedErr, err)
-	}
-}
+// func Test_changeExternalPassword(t *testing.T) {
+// 	oldExternalPassword := "myPassword"
+// 	newExternalPassword := "hunter2"
+// 	oldInternalPassword, err := getOrInit(oldExternalPassword)
+// 	if err != nil {
+// 		t.Errorf("%+v", err)
+// 	}
+
+// 	err = changeExternalPassword(oldExternalPassword, newExternalPassword)
+// 	if err != nil {
+// 		t.Errorf("%+v", err)
+// 	}
+
+// 	newInternalPassword, err := getOrInit(newExternalPassword)
+// 	if err != nil {
+// 		t.Errorf("%+v", err)
+// 	}
+
+// 	if !bytes.Equal(oldInternalPassword, newInternalPassword) {
+// 		t.Errorf("Internal password was not changed in storage. Old and new "+
+// 			"should be different.\nold: %+v\nnew: %+v",
+// 			oldInternalPassword, newInternalPassword)
+// 	}
+
+// 	_, err = getOrInit(oldExternalPassword)
+// 	expectedErr := strings.Split(decryptWithPasswordErr, "%")[0]
+// 	if err == nil || !strings.Contains(err.Error(), expectedErr) {
+// 		t.Errorf("Unexpected error when trying to get internal password with "+
+// 			"old external password.\nexpected: %s\nreceived: %+v", expectedErr, err)
+// 	}
+// }
 
 // Tests that verifyPassword returns true for a valid password and false for an
 // invalid password
-- 
GitLab