mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 18:48:08 +00:00 
			
		
		
		
	 fa13dbd381
			
		
	
	fa13dbd381
	
	
	
		
			
			* 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)
 | |
| 	})
 | |
| }
 |