Skip to content

Commit

Permalink
Add KUBE_API_VERSIONS to tests config
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Nov 9, 2021
1 parent f9a79dd commit a46833a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,17 @@ function patch_test() {
# Generate output file basing on the input values.yaml
function generate_file {
local template_name="${1}"
local kube_api_versions_flags=""
if (( ${#KUBE_API_VERSIONS[@]} )); then
kube_api_versions_flags=${KUBE_API_VERSIONS[@]/#/--api-versions }
fi

docker run --rm \
-v "${TEST_SCRIPT_PATH}/../../deploy/helm/sumologic":/chart \
-v "${TEST_STATICS_PATH}/${input_file}":/values.yaml \
sumologic/kubernetes-tools:2.4.1 \
helm template /chart -f /values.yaml \
${kube_api_versions_flags} \
--namespace sumologic \
--set sumologic.accessId='accessId' \
--set sumologic.accessKey='accessKey' \
Expand Down
1 change: 1 addition & 0 deletions tests/metadata_logs_otc/config.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

export TEST_TEMPLATE="templates/logs/otelcol/configmap.yaml"
export KUBE_API_VERSIONS=("policy/v1/PodDisruptionBudget")

0 comments on commit a46833a

Please sign in to comment.