From 8c6c42f07936717e8ebb07ce2386a662b657aeb3 Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Fri, 2 Jun 2023 17:51:29 +0000 Subject: [PATCH] Disable Test_initInternalPassword_CsprngReadNumBytesError as it's not possible any longer with temporary password gen change --- storage/password_test.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/storage/password_test.go b/storage/password_test.go index 9ec472c5..fecd785c 100644 --- a/storage/password_test.go +++ b/storage/password_test.go @@ -154,20 +154,20 @@ func Test_initInternalPassword_CsprngReadError(t *testing.T) { // Tests that initInternalPassword returns an error when the RNG does not // return enough bytes. -func Test_initInternalPassword_CsprngReadNumBytesError(t *testing.T) { - externalPassword := "myPassword" - ls := storage.GetLocalStorage() - b := bytes.NewBuffer(make([]byte, internalPasswordLen/2)) +// func Test_initInternalPassword_CsprngReadNumBytesError(t *testing.T) { +// externalPassword := "myPassword" +// ls := storage.GetLocalStorage() +// b := bytes.NewBuffer(make([]byte, internalPasswordLen/2)) - expectedErr := fmt.Sprintf( - internalPasswordNumBytesErr, internalPasswordLen, internalPasswordLen/2) +// expectedErr := fmt.Sprintf( +// internalPasswordNumBytesErr, internalPasswordLen, internalPasswordLen/2) - _, err := initInternalPassword(externalPassword, ls, b, defaultParams()) - if err == nil || !strings.Contains(err.Error(), expectedErr) { - t.Errorf("Unexpected error when RNG does not return enough bytes."+ - "\nexpected: %s\nreceived: %+v", expectedErr, err) - } -} +// _, err := initInternalPassword(externalPassword, ls, b, defaultParams()) +// if err == nil || !strings.Contains(err.Error(), expectedErr) { +// t.Errorf("Unexpected error when RNG does not return enough bytes."+ +// "\nexpected: %s\nreceived: %+v", expectedErr, err) +// } +// } // Tests that getInternalPassword returns the internal password that is saved // to local storage by initInternalPassword. -- GitLab