mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-04 04:28:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			327 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			327 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package command
 | 
						|
 | 
						|
import (
 | 
						|
	"testing"
 | 
						|
 | 
						|
	"github.com/hashicorp/vault/api"
 | 
						|
)
 | 
						|
 | 
						|
func testClient(t *testing.T, addr string, token string) *api.Client {
 | 
						|
	config := api.DefaultConfig()
 | 
						|
	config.Address = addr
 | 
						|
	client, err := api.NewClient(config)
 | 
						|
	if err != nil {
 | 
						|
		t.Fatalf("err: %s", err)
 | 
						|
	}
 | 
						|
	client.SetToken(token)
 | 
						|
 | 
						|
	return client
 | 
						|
}
 |