Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Measure cluster creation and image loading time
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Dec 5, 2019
1 parent 38c58ed commit c370ed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ if ! kubectl version > /dev/null 2>&1; then
install_kind

echo '>>> Creating Kind Kubernetes cluster(s)'
seq 1 "${E2E_KIND_CLUSTER_NUM}" | parallel -- kind create cluster --name "${KIND_CLUSTER_PREFIX}-{}" --wait 5m
seq 1 "${E2E_KIND_CLUSTER_NUM}" | time parallel -- kind create cluster --name "${KIND_CLUSTER_PREFIX}-{}" --wait 5m
for I in $(seq 1 "${E2E_KIND_CLUSTER_NUM}"); do
defer kind --name "${KIND_CLUSTER_PREFIX}-${I}" delete cluster > /dev/null 2>&1 || true
# Wire tests with the right cluster based on their BATS_JOB_SLOT env variable
eval export KUBECONFIG_SLOT_"${I}"="$(kind --name="${KIND_CLUSTER_PREFIX}-${I}" get kubeconfig-path)"
done

echo '>>> Loading images into the Kind cluster(s)'
seq 1 "${E2E_KIND_CLUSTER_NUM}" | parallel -- kind --name "${KIND_CLUSTER_PREFIX}-{}" load docker-image 'docker.io/fluxcd/flux:latest'
seq 1 "${E2E_KIND_CLUSTER_NUM}" | time parallel -- kind --name "${KIND_CLUSTER_PREFIX}-{}" load docker-image 'docker.io/fluxcd/flux:latest'
if [ "${E2E_KIND_CLUSTER_NUM}" -gt 1 ]; then
BATS_EXTRA_ARGS="--jobs ${E2E_KIND_CLUSTER_NUM}"
fi
Expand Down

0 comments on commit c370ed7

Please sign in to comment.