2021-04-15 00:26:12 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-06-26 21:06:46 +00:00
|
|
|
# Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
2021-04-15 00:26:12 +00:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
#
|
|
|
|
# Print the PINNIPED_TEST_* env vars from /tmp/integration-test-env in a format that can be used in GoLand.
|
|
|
|
#
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
|
|
|
|
|
2023-10-12 15:23:47 +00:00
|
|
|
env_file_name=${1:-"undefined"}
|
|
|
|
if [ "${env_file_name}" == "undefined" ]
|
|
|
|
then
|
|
|
|
echo "environment variable file name must be specified."
|
|
|
|
echo "hint: this is typically in the output of running hack/prepare-for-integration-tests.sh"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
source "${env_file_name}"
|
2021-04-15 00:26:12 +00:00
|
|
|
|
2021-09-21 19:04:45 +00:00
|
|
|
echo -n "PINNIPED_TEST_GOLAND_RUNNER=true;"
|
|
|
|
|
2021-04-15 00:26:12 +00:00
|
|
|
printenv | grep PINNIPED_TEST_ | sed 's/=.*//g' | grep -v CLUSTER_CAPABILITY_YAML | while read -r var ; do
|
|
|
|
echo -n "${var}="
|
2023-06-26 21:06:46 +00:00
|
|
|
# Goland will treat semicolons as key/value pair separators.
|
|
|
|
# Within a value, a semicolon needs to be escaped with a backslash for Goland.
|
|
|
|
echo -n "${!var}" | sed 's/;/\\;/g' | tr -d '\n'
|
2021-04-15 00:26:12 +00:00
|
|
|
echo -n ";"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo -n "PINNIPED_TEST_CLUSTER_CAPABILITY_FILE=${ROOT}/test/cluster_capabilities/kind.yaml"
|