Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ishustava committed Nov 29, 2021
1 parent 5044e42 commit 809c612
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion acceptance/framework/vault/vault_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ func (v *VaultCluster) bootstrap(t *testing.T, ctx environment.TestContext) {
}

v.logger.Logf(t, "updating vault kube auth config")

// To configure the auth method, we need to read the token and the ca cert from the Vault's server
// service account token.
namespace := v.helmOptions.KubectlOptions.Namespace
sa, err := v.kubernetesClient.CoreV1().ServiceAccounts(namespace).Get(context.Background(), fmt.Sprintf("%s-vault", v.releaseName), metav1.GetOptions{})
require.NoError(t, err)
Expand Down Expand Up @@ -302,12 +305,13 @@ func (v *VaultCluster) initAndUnseal(t *testing.T) {
namespace := v.helmOptions.KubectlOptions.Namespace
retrier := &retry.Timer{Timeout: 2 * time.Minute, Wait: 1 * time.Second}
retry.RunWith(retrier, t, func(r *retry.R) {
// First wait for vault server pod to be running.
// Wait for vault server pod to be running so that we can create Vault client without errors.
serverPod, err := v.kubernetesClient.CoreV1().Pods(namespace).Get(context.Background(), fmt.Sprintf("%s-vault-0", v.releaseName), metav1.GetOptions{})
require.NoError(r, err)
require.Equal(r, serverPod.Status.Phase, corev1.PodRunning)

v.vaultClient = v.SetupVaultClient(t)

initResp, err := v.vaultClient.Sys().Init(&vapi.InitRequest{
SecretShares: 1,
SecretThreshold: 1,
Expand Down

0 comments on commit 809c612

Please sign in to comment.