Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Create functional test for different KubevirtCI cluster configu… #1253

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions cluster-provision/k8s/check-cluster-opts.sh
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably use new shell so the envs would be unset?


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
)