// Create a Vault client configured to talk to Vault running at the given domain name
Create a Vault client configured to talk to Vault running at the given domain name
// Create a Vault client configured to talk to Vault running at the given domain name
func createVaultClient(t *testing.T, domainName string) *api.Client {
	config := api.DefaultConfig()
	config.Address = fmt.Sprintf("https://%s:%d", domainName, VAULT_PORT)
	clientTLSConfig := config.HttpClient.Transport.(*http.Transport).TLSClientConfig
	clientTLSConfig.InsecureSkipVerify = true
	client, err := api.NewClient(config)
	if err != nil {
		t.Fatalf("Failed to create Vault client: %v", err)
	}
	return client
}
func createVaultClient ( t * testing . T , domainName string ) * api . Client { config := api . DefaultConfig ( ) config . Address = fmt . Sprintf ( " " , domainName , VAULT_PORT ) clientTLSConfig := config . HttpClient . Transport . ( * http . Transport ) . TLSClientConfig clientTLSConfig . InsecureSkipVerify = true client , err := api . NewClient ( config ) if err != nil { t . Fatalf ( " " , err ) } return client }
Create a Vault client configured to talk to Vault running at the given domain name
Create a Vault client configured to talk to Vault running at the given domain name
// The TLS cert we are using in this test does not have the instance DNS name in it, so disable the TLS check