#!/usr/bin/env bats load _helpers @test "serverACLInitCleanup/ServiceAccount: disabled by default" { cd `chart_dir` local actual=$(helm template \ -x templates/server-acl-init-cleanup-serviceaccount.yaml \ . | tee /dev/stderr | yq 'length > 0' | tee /dev/stderr) [ "${actual}" = "false" ] } @test "serverACLInitCleanup/ServiceAccount: enabled with global.bootstrapACLs=true" { cd `chart_dir` local actual=$(helm template \ -x templates/server-acl-init-cleanup-serviceaccount.yaml \ --set 'global.bootstrapACLs=true' \ . | tee /dev/stderr | yq 'length > 0' | tee /dev/stderr) [ "${actual}" = "true" ] } @test "serverACLInitCleanup/ServiceAccount: disabled with server=false and global.bootstrapACLs=true" { cd `chart_dir` local actual=$(helm template \ -x templates/server-acl-init-cleanup-serviceaccount.yaml \ --set 'global.bootstrapACLs=true' \ --set 'server.enabled=false' \ . | tee /dev/stderr | yq 'length > 0' | tee /dev/stderr) [ "${actual}" = "false" ] } @test "serverACLInitCleanup/ServiceAccount: enabled with client=false and global.bootstrapACLs=true" { cd `chart_dir` local actual=$(helm template \ -x templates/server-acl-init-cleanup-serviceaccount.yaml \ --set 'global.bootstrapACLs=true' \ --set 'client.enabled=false' \ . | tee /dev/stderr | yq 'length > 0' | tee /dev/stderr) [ "${actual}" = "true" ] }