Skip to content

Commit

Permalink
remove todo; update consul image
Browse files Browse the repository at this point in the history
  • Loading branch information
ishustava committed Nov 22, 2021
1 parent 274b5f6 commit 8537635
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions acceptance/tests/vault/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ path "/connect_inter/*" {
`
)

// todo: update
// Installs Vault, bootstraps it with secrets, policies, and Kube Auth Method
// then creates a gossip encryption secret and uses this to bootstrap Consul.
// TestVault installs Vault, bootstraps it with secrets, policies, and Kube Auth Method.
// It then configures Consul to use vault as the backend and checks that it works.
func TestVault(t *testing.T) {
cfg := suite.Config()
ctx := suite.Environment().DefaultContext(t)
Expand Down Expand Up @@ -102,9 +101,8 @@ func TestVault(t *testing.T) {
}
_, err = vaultClient.Logical().Write("consul/data/secret/gossip", params)
require.NoError(t, err)

consulHelmValues := map[string]string{
"global.image": "ishustava/consul-dev@sha256:a873b4aa28f7511628281e852daab4c04918872bb86023cefb6197acabb43426",
"global.image": "docker.mirror.hashicorp.services/hashicorpdev/consul:latest",

"server.enabled": "true",
"server.replicas": "1",
Expand Down Expand Up @@ -134,8 +132,8 @@ func TestVault(t *testing.T) {
consulClient := consulCluster.SetupConsulClient(t, true)
keys, err := consulClient.Operator().KeyringList(nil)
require.NoError(t, err)
// There should only be one key since there is only 1 dc.
require.Len(t, keys, 1)
// There should are two identical keys for LAN and WAN since there is only 1 dc.
require.Len(t, keys, 2)
require.Equal(t, 1, keys[0].PrimaryKeys[gossipKey])

// Confirm that the Vault Connect CA has been bootstrapped correctly.
Expand Down

0 comments on commit 8537635

Please sign in to comment.