[#1138] adm/test: Use --size=1
for negative tests
All checks were successful
DCO action / DCO (pull_request) Successful in 1m24s
Vulncheck / Vulncheck (pull_request) Successful in 2m54s
Build / Build Components (1.21) (pull_request) Successful in 3m53s
Build / Build Components (1.22) (pull_request) Successful in 3m50s
Tests and linters / Staticcheck (pull_request) Successful in 4m47s
Tests and linters / gopls check (pull_request) Successful in 5m22s
Tests and linters / Lint (pull_request) Successful in 6m17s
Pre-commit hooks / Pre-commit (pull_request) Successful in 9m16s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m49s
Tests and linters / Tests (1.22) (pull_request) Successful in 10m0s
Tests and linters / Tests with -race (pull_request) Successful in 10m5s
All checks were successful
DCO action / DCO (pull_request) Successful in 1m24s
Vulncheck / Vulncheck (pull_request) Successful in 2m54s
Build / Build Components (1.21) (pull_request) Successful in 3m53s
Build / Build Components (1.22) (pull_request) Successful in 3m50s
Tests and linters / Staticcheck (pull_request) Successful in 4m47s
Tests and linters / gopls check (pull_request) Successful in 5m22s
Tests and linters / Lint (pull_request) Successful in 6m17s
Pre-commit hooks / Pre-commit (pull_request) Successful in 9m16s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m49s
Tests and linters / Tests (1.22) (pull_request) Successful in 10m0s
Tests and linters / Tests with -race (pull_request) Successful in 10m5s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
13fb312f76
commit
f258046a45
1 changed files with 4 additions and 6 deletions
|
@ -23,8 +23,6 @@ import (
|
|||
)
|
||||
|
||||
func TestGenerateAlphabet(t *testing.T) {
|
||||
const size = 4
|
||||
|
||||
walletDir := t.TempDir()
|
||||
buf := setupTestTerminal(t)
|
||||
|
||||
|
@ -55,13 +53,13 @@ func TestGenerateAlphabet(t *testing.T) {
|
|||
t.Run("no password for contract group wallet", func(t *testing.T) {
|
||||
buf.Reset()
|
||||
v.Set(commonflags.AlphabetWalletsFlag, walletDir)
|
||||
require.NoError(t, cmd.Flags().Set(commonflags.AlphabetSizeFlag, strconv.FormatUint(size, 10)))
|
||||
for i := uint64(0); i < size; i++ {
|
||||
buf.WriteString(strconv.FormatUint(i, 10) + "\r")
|
||||
}
|
||||
require.NoError(t, cmd.Flags().Set(commonflags.AlphabetSizeFlag, "1"))
|
||||
buf.WriteString("pass\r")
|
||||
require.Error(t, AlphabetCreds(cmd, nil))
|
||||
})
|
||||
|
||||
const size = 4
|
||||
|
||||
buf.Reset()
|
||||
v.Set(commonflags.AlphabetWalletsFlag, walletDir)
|
||||
require.NoError(t, GenerateAlphabetCmd.Flags().Set(commonflags.AlphabetSizeFlag, strconv.FormatUint(size, 10)))
|
||||
|
|
Loading…
Add table
Reference in a new issue