Skip to content

Commit

Permalink
fix: make e2e test available on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Kavinjsir committed Jan 27, 2024
1 parent 1e495ea commit 3855afc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fi

export KIND_K8S_VERSION="${KIND_K8S_VERSION:-"v1.28.0"}"
tools_k8s_version=$(convert_to_tools_ver "${KIND_K8S_VERSION#v*}")
kind_version=0.15.0
kind_version=0.20.0
goarch=amd64

if [[ "$OSTYPE" == "linux-gnu" ]]; then
Expand Down
19 changes: 10 additions & 9 deletions test/e2e/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ function delete_cluster {
function test_cluster {
local flags="$@"

docker pull memcached:1.4.36-alpine
kind load docker-image --name $KIND_CLUSTER memcached:1.4.36-alpine
docker pull memcached:1.6.23-alpine
kind load docker-image --name $KIND_CLUSTER memcached:1.6.23-alpine

docker pull busybox:1.28
kind load docker-image --name $KIND_CLUSTER busybox:1.28
docker pull busybox:1.36.1
kind load docker-image --name $KIND_CLUSTER busybox:1.36.1

go test $(dirname "$0")/grafana $flags -timeout 30m
go test $(dirname "$0")/deployimage $flags -timeout 30m
Expand All @@ -70,11 +70,12 @@ function test_cluster {
}

function build_sample_external_plugin {
# TODO: Dynamically set exteranl plugin destination based on OS platform
# EXTERNAL_PLUGIN_DESTINATION_PREFIX="${HOME}/Library/Application Support/kubebuilder/plugins"
# For Linux:
XDG_CONFIG_HOME="${HOME}/.config"
EXTERNAL_PLUGIN_DESTINATION_PREFIX="$XDG_CONFIG_HOME/kubebuilder/plugins"
if [ "$(uname -s)" == "Darwin" ]; then
EXTERNAL_PLUGIN_DESTINATION_PREFIX="${HOME}/Library/Application Support/kubebuilder/plugins"
else
XDG_CONFIG_HOME="${HOME}/.config"
EXTERNAL_PLUGIN_DESTINATION_PREFIX="$XDG_CONFIG_HOME/kubebuilder/plugins"
fi

PLUGIN_NAME="sampleexternalplugin"
PLUGIN_VERSION="v1"
Expand Down

0 comments on commit 3855afc

Please sign in to comment.