Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e576227

Browse files
committed
updating tests
Signed-off-by: Philip-21 <[email protected]>
1 parent 778c116 commit e576227

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cli/tokens_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ func TestTokens(t *testing.T) {
4242
require.NotEmpty(t, res)
4343
id := res[:10]
4444

45+
inv, root = clitest.New(t, "tokens", "create", "-u", "user-one")
46+
clitest.SetupConfig(t, client, root)
47+
buf = new(bytes.Buffer)
48+
inv.Stdout = buf
49+
err = inv.WithContext(ctx).Run()
50+
require.NoError(t, err)
51+
res = buf.String()
52+
require.NotEmpty(t, res)
53+
54+
4555
inv, root = clitest.New(t, "tokens", "ls")
4656
clitest.SetupConfig(t, client, root)
4757
buf = new(bytes.Buffer)

0 commit comments

Comments
 (0)