Skip to content

Commit

Permalink
comment formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurret committed May 18, 2022
1 parent 369b995 commit 106e22d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions acceptance/tests/vault/vault_tls_auto_reload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestVault_TlsAutoReload(t *testing.T) {
// -------------------------
// KV2 secrets
// -------------------------
//Gossip key
// Gossip key
gossipKey, err := vault.GenerateGossipSecret()
require.NoError(t, err)
gossipSecret := &vault.SaveVaultSecretConfiguration{
Expand All @@ -80,7 +80,7 @@ func TestVault_TlsAutoReload(t *testing.T) {
}
vault.SaveSecret(t, vaultClient, gossipSecret)

//License
// License
licenseSecret := &vault.SaveVaultSecretConfiguration{
Path: "consul/data/secret/license",
Key: "license",
Expand All @@ -91,7 +91,7 @@ func TestVault_TlsAutoReload(t *testing.T) {
vault.SaveSecret(t, vaultClient, licenseSecret)
}

//Bootstrap Token
// Bootstrap Token
bootstrapToken, err := uuid.GenerateUUID()
require.NoError(t, err)
bootstrapTokenSecret := &vault.SaveVaultSecretConfiguration{
Expand All @@ -110,7 +110,7 @@ func TestVault_TlsAutoReload(t *testing.T) {
serverPolicies += fmt.Sprintf(",%s", licenseSecret.PolicyName)
}

//server
// server
consulServerRole := "server"
vault.ConfigureK8SAuthRole(t, vaultClient, &vault.KubernetesAuthRoleConfiguration{
ServiceAccountName: serverPKIConfig.ServiceAccountName,
Expand All @@ -120,7 +120,7 @@ func TestVault_TlsAutoReload(t *testing.T) {
PolicyNames: serverPolicies,
})

//client
// client
consulClientRole := "client"
consulClientServiceAccountName := fmt.Sprintf("%s-consul-%s", consulReleaseName, "client")
vault.ConfigureK8SAuthRole(t, vaultClient, &vault.KubernetesAuthRoleConfiguration{
Expand All @@ -131,7 +131,7 @@ func TestVault_TlsAutoReload(t *testing.T) {
PolicyNames: gossipSecret.PolicyName,
})

//manageSystemACLs
// manageSystemACLs
manageSystemACLsRole := "server-acl-init"
manageSystemACLsServiceAccountName := fmt.Sprintf("%s-consul-%s", consulReleaseName, "server-acl-init")
vault.ConfigureK8SAuthRole(t, vaultClient, &vault.KubernetesAuthRoleConfiguration{
Expand Down
24 changes: 12 additions & 12 deletions acceptance/tests/vault/vault_wan_fed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
// Configure Policy for Connect CA
vault.CreateConnectCARootAndIntermediatePKIPolicy(t, vaultClient, connectCAPolicy, connectCARootPath, connectCAIntermediatePath)

//Configure Server PKI
// Configure Server PKI
serverPKIConfig := &vault.PKIAndAuthRoleConfiguration{
BaseURL: "pki",
PolicyName: "consul-ca-policy",
Expand All @@ -140,7 +140,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
// Configure Policy for Connect CA
vault.CreateConnectCARootAndIntermediatePKIPolicy(t, vaultClient, connectCAPolicySecondary, connectCARootPathSecondary, connectCAIntermediatePathSecondary)

//Configure Server PKI
// Configure Server PKI
serverPKIConfigSecondary := &vault.PKIAndAuthRoleConfiguration{
BaseURL: "pki",
PolicyName: "consul-ca-policy-dc2",
Expand All @@ -158,7 +158,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
// -------------------------
// KV2 secrets
// -------------------------
//Gossip key
// Gossip key
gossipKey, err := vault.GenerateGossipSecret()
require.NoError(t, err)
gossipSecret := &vault.SaveVaultSecretConfiguration{
Expand All @@ -169,7 +169,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
}
vault.SaveSecret(t, vaultClient, gossipSecret)

//License
// License
licenseSecret := &vault.SaveVaultSecretConfiguration{
Path: "consul/data/secret/license",
Key: "license",
Expand All @@ -180,7 +180,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
vault.SaveSecret(t, vaultClient, licenseSecret)
}

//Bootstrap Token
// Bootstrap Token
bootstrapToken, err := uuid.GenerateUUID()
require.NoError(t, err)
bootstrapTokenSecret := &vault.SaveVaultSecretConfiguration{
Expand All @@ -191,7 +191,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
}
vault.SaveSecret(t, vaultClient, bootstrapTokenSecret)

//Replication Token
// Replication Token
replicationToken, err := uuid.GenerateUUID()
require.NoError(t, err)
replicationTokenSecret := &vault.SaveVaultSecretConfiguration{
Expand All @@ -210,7 +210,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
// --------------------------------------------
// Additional Auth Roles for Primary Datacenter
// --------------------------------------------
//server
// server
serverPolicies := fmt.Sprintf("%s,%s,%s,%s", commonServerPolicies, connectCAPolicy, serverPKIConfig.PolicyName, bootstrapTokenSecret.PolicyName)
if cfg.EnableEnterprise {
serverPolicies += fmt.Sprintf(",%s", licenseSecret.PolicyName)
Expand All @@ -224,7 +224,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
PolicyNames: serverPolicies,
})

//client
// client
consulClientRole := "client"
consulClientServiceAccountName := fmt.Sprintf("%s-consul-%s", consulReleaseName, "client")
vault.ConfigureK8SAuthRole(t, vaultClient, &vault.KubernetesAuthRoleConfiguration{
Expand All @@ -235,7 +235,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
PolicyNames: gossipSecret.PolicyName,
})

//manageSystemACLs
// manageSystemACLs
manageSystemACLsRole := "server-acl-init"
manageSystemACLsServiceAccountName := fmt.Sprintf("%s-consul-%s", consulReleaseName, "server-acl-init")
vault.ConfigureK8SAuthRole(t, vaultClient, &vault.KubernetesAuthRoleConfiguration{
Expand All @@ -258,7 +258,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
// --------------------------------------------
// Additional Auth Roles for Secondary Datacenter
// --------------------------------------------
//server
// server
secondaryServerPolicies := fmt.Sprintf("%s,%s,%s,%s", commonServerPolicies, connectCAPolicySecondary, serverPKIConfigSecondary.PolicyName, replicationTokenSecret.PolicyName)
vault.ConfigureK8SAuthRole(t, vaultClient, &vault.KubernetesAuthRoleConfiguration{
ServiceAccountName: serverPKIConfig.ServiceAccountName,
Expand All @@ -268,7 +268,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
PolicyNames: secondaryServerPolicies,
})

//client
// client
vault.ConfigureK8SAuthRole(t, vaultClient, &vault.KubernetesAuthRoleConfiguration{
ServiceAccountName: consulClientServiceAccountName,
KubernetesNamespace: ns,
Expand All @@ -277,7 +277,7 @@ func TestVault_WANFederationViaGateways(t *testing.T) {
PolicyNames: gossipSecret.PolicyName,
})

//manageSystemACLs
// manageSystemACLs
vault.ConfigureK8SAuthRole(t, vaultClient, &vault.KubernetesAuthRoleConfiguration{
ServiceAccountName: manageSystemACLsServiceAccountName,
KubernetesNamespace: ns,
Expand Down

0 comments on commit 106e22d

Please sign in to comment.