diff --git a/charts/consul/test/unit/sync-catalog-deployment.bats b/charts/consul/test/unit/sync-catalog-deployment.bats index 0c9579df20..b60b030ac0 100755 --- a/charts/consul/test/unit/sync-catalog-deployment.bats +++ b/charts/consul/test/unit/sync-catalog-deployment.bats @@ -413,6 +413,29 @@ load _helpers [ "${actual}" = "true" ] } +#-------------------------------------------------------------------- +# syncLoadBalancerEndpoints + +@test "syncCatalog/Deployment: enable LB endpoints sync flag not passed when disabled" { + cd `chart_dir` + local actual=$(helm template \ + -s templates/sync-catalog-deployment.yaml \ + --set 'syncCatalog.enabled=true' \ + . | tee /dev/stderr | + yq '.spec.template.spec.containers[0].command | any(contains("-sync-lb-services-endpoints=true"))' | tee /dev/stderr) + [ "${actual}" = "false" ] +} +@test "syncCatalog/Deployment: enable LB endpoints sync flag passed when enabled" { + cd `chart_dir` + local actual=$(helm template \ + -s templates/sync-catalog-deployment.yaml \ + --set 'syncCatalog.enabled=true' \ + --set 'syncCatalog.syncLoadBalancerEndpoints=true' \ + . | tee /dev/stderr | + yq '.spec.template.spec.containers[0].command | any(contains("-sync-lb-services-endpoints=true"))' | tee /dev/stderr) + [ "${actual}" = "true" ] +} + #-------------------------------------------------------------------- # affinity