Skip to content
Snippets Groups Projects
Commit 8c6c42f0 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Disable Test_initInternalPassword_CsprngReadNumBytesError as it's not possible...

Disable Test_initInternalPassword_CsprngReadNumBytesError as it's not possible any longer with temporary password gen change
parent 759744a4
No related branches found
No related tags found
3 merge requests!127Modify internal password generation to base it off the user's password,!124Update for single DB cipher object,!109Project/haven beta
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment