test: fix TestAgent_Template_Basic (#8257)
* test: fix TestAgent_Template_Basic * test: fix TestAgent_Template_ExitCounter
This commit is contained in:
parent
0b7afcc728
commit
d8dfd81e47
|
@ -638,6 +638,11 @@ func TestAgent_Template_Basic(t *testing.T) {
|
|||
vault.TestWaitActive(t, cluster.Cores[0].Core)
|
||||
serverClient := cluster.Cores[0].Client
|
||||
|
||||
// Unset the environment variable so that agent picks up the right test
|
||||
// cluster address
|
||||
defer os.Setenv(api.EnvVaultAddress, os.Getenv(api.EnvVaultAddress))
|
||||
os.Setenv(api.EnvVaultAddress, serverClient.Address())
|
||||
|
||||
// Enable the approle auth method
|
||||
req := serverClient.NewRequest("POST", "/v1/sys/auth/approle")
|
||||
req.BodyBytes = []byte(`{
|
||||
|
@ -912,6 +917,11 @@ func TestAgent_Template_ExitCounter(t *testing.T) {
|
|||
vault.TestWaitActive(t, cluster.Cores[0].Core)
|
||||
serverClient := cluster.Cores[0].Client
|
||||
|
||||
// Unset the environment variable so that agent picks up the right test
|
||||
// cluster address
|
||||
defer os.Setenv(api.EnvVaultAddress, os.Getenv(api.EnvVaultAddress))
|
||||
os.Setenv(api.EnvVaultAddress, serverClient.Address())
|
||||
|
||||
// Enable the approle auth method
|
||||
req := serverClient.NewRequest("POST", "/v1/sys/auth/approle")
|
||||
req.BodyBytes = []byte(`{
|
||||
|
|
Loading…
Reference in New Issue