From af57d5a6a12f1be58c836e079ff3fc73acca39b3 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 15 May 2024 16:12:41 +0300 Subject: [PATCH] [#1138] adm/test: Use `--size=1` for negative tests Signed-off-by: Evgenii Stratonikov --- .../internal/modules/morph/generate/generate_test.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cmd/frostfs-adm/internal/modules/morph/generate/generate_test.go b/cmd/frostfs-adm/internal/modules/morph/generate/generate_test.go index d4a4fee5d..1dd6420eb 100644 --- a/cmd/frostfs-adm/internal/modules/morph/generate/generate_test.go +++ b/cmd/frostfs-adm/internal/modules/morph/generate/generate_test.go @@ -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)))