mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-06 14:47:01 +02:00
* add gosimport to make fmt and run it * move installation to tools.sh * correct weird spacing issue * Update Makefile Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com> * fix a weird issue --------- Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
37 lines
622 B
Go
37 lines
622 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package command
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/cli"
|
|
"github.com/hashicorp/vault/command/token"
|
|
)
|
|
|
|
func testAuthCommand(tb testing.TB) (*cli.MockUi, *AuthCommand) {
|
|
tb.Helper()
|
|
|
|
ui := cli.NewMockUi()
|
|
return ui, &AuthCommand{
|
|
BaseCommand: &BaseCommand{
|
|
UI: ui,
|
|
|
|
// Override to our own token helper
|
|
tokenHelper: token.NewTestingTokenHelper(),
|
|
},
|
|
}
|
|
}
|
|
|
|
func TestAuthCommand_Run(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
t.Run("no_tabs", func(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, cmd := testAuthCommand(t)
|
|
assertNoTabs(t, cmd)
|
|
})
|
|
}
|