-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Create functional test for different KubevirtCI cluster configu…
…rations This should run as a CI lane. It will repetitively up and down clusters with the following features in the order they are named in KSM and Swap NFS CSI Rook Ceph ETCD in memory Signed-off-by: aerosouund <[email protected]>
- Loading branch information
1 parent
8501d22
commit 35e4c1c
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
|
||
set -exuo pipefail | ||
|
||
make -C ../gocli container | ||
|
||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
provision_dir="$1" | ||
provider="${provision_dir}" | ||
|
||
function cleanup() { | ||
cd "$DIR" && cd ../.. | ||
make cluster-down | ||
} | ||
|
||
export KUBEVIRTCI_GOCLI_CONTAINER=quay.io/kubevirtci/gocli:latest | ||
# check cluster-up | ||
( | ||
ksh="./cluster-up/kubectl.sh" | ||
cd "$DIR" && cd ../.. | ||
export KUBEVIRTCI_PROVISION_CHECK=1 | ||
export KUBEVIRT_PROVIDER="k8s-${provider}" | ||
export KUBEVIRT_MEMORY_SIZE=5520M | ||
|
||
# Test KSM and Swap | ||
export KUBEVIRT_KSM_ON="true" | ||
export KUBEVIRT_KSM_SLEEP_BETWEEN_SCANS_MS=20 | ||
export KUBEVIRT_KSM_PAGES_TO_SCAN=10 | ||
|
||
export KUBEVIRT_SWAP_ON="true" | ||
export KUBEVIRT_SWAP_SIZE_IN_GB=1 | ||
|
||
trap cleanup EXIT ERR SIGINT SIGTERM SIGQUIT | ||
make cluster-up | ||
${ksh} get nodes | ||
make cluster-down | ||
|
||
export KUBEVIRT_KSM_ON="false" | ||
export KUBEVIRT_SWAP_ON="false" | ||
|
||
# Test ETCD in memory | ||
export KUBEVIRT_WITH_ETC_IN_MEMORY="true" | ||
export KUBEVIRT_WITH_ETC_CAPACITY="1024M" | ||
make cluster-up | ||
${ksh} get nodes | ||
make cluster-down | ||
|
||
# Test NFS CSI | ||
export KUBEVIRT_DEPLOY_NFS_CSI="true" | ||
make cluster-up | ||
${ksh} get nodes | ||
make cluster-down | ||
|
||
export KUBEVIRT_DEPLOY_NFS_CSI="false" | ||
|
||
# Test rook ceph | ||
export KUBEVIRT_STORAGE="rook-ceph-default" | ||
make cluster-up | ||
${ksh} get nodes | ||
make cluster-down | ||
) |