[#1103] neofs-cli: allow to set password in config
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
0c46827a08
commit
007158ebe1
2 changed files with 21 additions and 2 deletions
|
@ -92,6 +92,16 @@ func Test_getKey(t *testing.T) {
|
|||
|
||||
in.WriteString("pass\r")
|
||||
checkKey(t, nep2, nep2Key)
|
||||
|
||||
t.Run("password from config", func(t *testing.T) {
|
||||
viper.Set(password, "invalid")
|
||||
in.WriteString("pass\r")
|
||||
checkKeyError(t, nep2, errInvalidPassword)
|
||||
|
||||
viper.Set(password, "pass")
|
||||
in.WriteString("invalid\r")
|
||||
checkKey(t, nep2, nep2Key)
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("raw key", func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue