tests: Move ensure_yq to common.bash

As this function will be used by different scripts, let's move it to a
common place.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio
2023-07-13 12:37:29 +02:00
parent 124e390333
commit b87ed27416
2 changed files with 11 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ set -o nounset
set -o pipefail
kubernetes_dir="$(dirname "$(readlink -f "$0")")"
repo_root_dir="$(cd "${kubernetes_dir}/../../../" && pwd)"
source "${kubernetes_dir}/../../common.bash"
tools_dir="${repo_root_dir}/tools"
function _print_cluster_name() {
@@ -59,13 +59,6 @@ function get_cluster_credentials() {
-n "$(_print_cluster_name)"
}
function ensure_yq() {
: "${GOPATH:=${GITHUB_WORKSPACE}}"
export GOPATH
export PATH="${GOPATH}/bin:${PATH}"
INSTALL_IN_GOPATH=true "${repo_root_dir}/ci/install_yq.sh"
}
function run_tests() {
platform="${1}"
ensure_yq