Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
zalimeni committed Apr 12, 2024
1 parent dd794d3 commit eddf330
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/consul/test/unit/sync-catalog-deployment.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit eddf330

Please sign in to comment.