Skip to content

Commit

Permalink
Remove unneeded LOGIN_DATACENTER test
Browse files Browse the repository at this point in the history
  • Loading branch information
clly committed May 16, 2023
1 parent f2e6891 commit eb80f7f
Showing 1 changed file with 6 additions and 33 deletions.
39 changes: 6 additions & 33 deletions charts/consul/test/unit/telemetry-collector-deployment.bats
Original file line number Diff line number Diff line change
Expand Up @@ -158,33 +158,6 @@ load _helpers
[ "${actual}" = "" ]
}

#--------------------------------------------------------------------
# global.acls.manageSystemACLs

@test "telemetryCollector/Deployment: consul login datacenter is set to primary when when federation enabled in non-primary datacenter" {
cd `chart_dir`
local object=$(helm template \
-s templates/telemetry-collector-deployment.yaml \
--set 'telemetryCollector.enabled=true' \
--set 'telemetryCollector.image=foo' \
--set 'meshGateway.enabled=true' \
--set 'global.acls.manageSystemACLs=true' \
--set 'global.datacenter=dc1' \
--set 'global.federation.enabled=true' \
--set 'global.federation.primaryDatacenter=dc2' \
--set 'global.tls.enabled=true' \
. | tee /dev/stderr |
yq '.spec.template.spec.initContainers[0]' | tee /dev/stderr)

local actual=$(echo $object |
yq '[.env[4].name] | any(contains("CONSUL_LOGIN_DATACENTER"))' | tee /dev/stderr)
[ "${actual}" = "true" ]

local actual=$(echo $object |
yq '[.env[4].value] | any(contains("dc2"))' | tee /dev/stderr)
[ "${actual}" = "true" ]
}

#--------------------------------------------------------------------
# resources

Expand Down Expand Up @@ -590,7 +563,7 @@ load _helpers
--set 'global.cloud.authUrl.secretName=auth-url-name' \
.
[ "$status" -eq 1 ]

[[ "$output" =~ "When either global.cloud.authUrl.secretName or global.cloud.authUrl.secretKey is defined, both must be set." ]]
}

Expand All @@ -614,7 +587,7 @@ load _helpers
--set 'global.cloud.authUrl.secretKey=auth-url-key' \
.
[ "$status" -eq 1 ]

[[ "$output" =~ "When either global.cloud.authUrl.secretName or global.cloud.authUrl.secretKey is defined, both must be set." ]]
}

Expand All @@ -638,7 +611,7 @@ load _helpers
--set 'global.cloud.apiHost.secretName=auth-url-name' \
.
[ "$status" -eq 1 ]

[[ "$output" =~ "When either global.cloud.apiHost.secretName or global.cloud.apiHost.secretKey is defined, both must be set." ]]
}

Expand All @@ -662,7 +635,7 @@ load _helpers
--set 'global.cloud.apiHost.secretKey=auth-url-key' \
.
[ "$status" -eq 1 ]

[[ "$output" =~ "When either global.cloud.apiHost.secretName or global.cloud.apiHost.secretKey is defined, both must be set." ]]
}

Expand All @@ -686,7 +659,7 @@ load _helpers
--set 'global.cloud.scadaAddress.secretName=scada-address-name' \
.
[ "$status" -eq 1 ]

[[ "$output" =~ "When either global.cloud.scadaAddress.secretName or global.cloud.scadaAddress.secretKey is defined, both must be set." ]]
}

Expand All @@ -710,7 +683,7 @@ load _helpers
--set 'global.cloud.scadaAddress.secretKey=scada-address-key' \
.
[ "$status" -eq 1 ]

[[ "$output" =~ "When either global.cloud.scadaAddress.secretName or global.cloud.scadaAddress.secretKey is defined, both must be set." ]]
}

Expand Down

0 comments on commit eb80f7f

Please sign in to comment.