mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-14 14:14:15 +00:00
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:
parent
124e390333
commit
b87ed27416
@ -7,6 +7,9 @@
|
|||||||
# This file contains common functions that
|
# This file contains common functions that
|
||||||
# are being used by our metrics and integration tests
|
# are being used by our metrics and integration tests
|
||||||
|
|
||||||
|
this_script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
export repo_root_dir="$(cd "${this_script_dir}/../" && pwd)"
|
||||||
|
|
||||||
# Kata tests directory used for storing various test-related artifacts.
|
# Kata tests directory used for storing various test-related artifacts.
|
||||||
KATA_TESTS_BASEDIR="${KATA_TESTS_BASEDIR:-/var/log/kata-tests}"
|
KATA_TESTS_BASEDIR="${KATA_TESTS_BASEDIR:-/var/log/kata-tests}"
|
||||||
|
|
||||||
@ -330,3 +333,10 @@ function check_containerd_config_for_kata() {
|
|||||||
overwrite_containerd_config
|
overwrite_containerd_config
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ensure_yq() {
|
||||||
|
: "${GOPATH:=${GITHUB_WORKSPACE}}"
|
||||||
|
export GOPATH
|
||||||
|
export PATH="${GOPATH}/bin:${PATH}"
|
||||||
|
INSTALL_IN_GOPATH=true "${repo_root_dir}/ci/install_yq.sh"
|
||||||
|
}
|
||||||
|
@ -9,7 +9,7 @@ set -o nounset
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
kubernetes_dir="$(dirname "$(readlink -f "$0")")"
|
kubernetes_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
repo_root_dir="$(cd "${kubernetes_dir}/../../../" && pwd)"
|
source "${kubernetes_dir}/../../common.bash"
|
||||||
tools_dir="${repo_root_dir}/tools"
|
tools_dir="${repo_root_dir}/tools"
|
||||||
|
|
||||||
function _print_cluster_name() {
|
function _print_cluster_name() {
|
||||||
@ -59,13 +59,6 @@ function get_cluster_credentials() {
|
|||||||
-n "$(_print_cluster_name)"
|
-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() {
|
function run_tests() {
|
||||||
platform="${1}"
|
platform="${1}"
|
||||||
ensure_yq
|
ensure_yq
|
||||||
|
Loading…
Reference in New Issue
Block a user