blob: 737c4ffc3f586378698f616539e1b7db8bb746ca [file] [log] [blame]
Alexa0053b92022-10-14 16:38:28 -05001#!/bin/bash
2tenv=mos
3. /opt/si-tests/.sivenv/bin/activate
4cd $MY_PROJFOLDER/tmp
Alexc85212b2022-11-08 12:27:01 -06005. $MY_PROJFOLDER/envs/mccrc
6. $MY_PROJFOLDER/envs/target-${tenv}
Alex876e93a2022-12-21 12:02:13 -06007# Set concurrency
8echo "Current conformance concurrency is ${K8S_CONFORMANCE_CONCURRENCY}"
9export K8S_CONFORMANCE_CONCURRENCY=10
10echo "Using concurrency of ${K8S_CONFORMANCE_CONCURRENCY} for MOS"
Alexd1ac2262023-03-31 13:53:33 -050011export K8S_CONFORMANCE_RUN_NETPOLICY_TESTS=False
12echo "Run network policy tests is ${K8S_CONFORMANCE_CONCURRENCY} for MCC"
Alex876e93a2022-12-21 12:02:13 -060013
Ievgeniia Zadorozhna68ba4f32024-01-27 02:51:59 +010014if [ -z "$MOS_K8S_CONFORMANCE_IMAGE_VERSION" ]; then
15 echo "Error: Failed to determine Kubernetes Conformance image version. Please export K8S_CONFORMANCE_IMAGE_VERSION, for example, export K8S_CONFORMANCE_IMAGE_VERSION=1.xx.x-x"
16 exit 1
17else
18 echo "Using K8S Conformance image version ${MOS_K8S_CONFORMANCE_IMAGE_VERSION}"
19 export K8S_CONFORMANCE_IMAGE_VERSION=${MOS_K8S_CONFORMANCE_IMAGE_VERSION}
20fi
21
22if [ -z "$MOS_K8S_CONFORMANCE_IMAGE_URL" ]; then
23 echo "Error: Failed to determine Kubernetes Conformance image path. Please export K8S_CONFORMANCE_IMAGE_URL, for example, export K8S_CONFORMANCE_IMAGE_URL=mirantis.azurecr.io/lcm/kubernetes/k8s-conformance:v1.xx.x-x"
24 exit 1
25else
26 echo "Using K8S Conformance image path ${MOS_K8S_CONFORMANCE_IMAGE_URL}"
27 export K8S_CONFORMANCE_IMAGE_URL=${MOS_K8S_CONFORMANCE_IMAGE_URL}
28fi
29
Alex876e93a2022-12-21 12:02:13 -060030# Run tests
Alexa0053b92022-10-14 16:38:28 -050031pytest /opt/si-tests/si_tests/tests/deployment/test_k8s_conformance.py
32unset TARGET_CLUSTER
33unset TARGET_NAMESPACE
34deactivate
35# report
36if [ -d $MY_PROJFOLDER/reports/${tenv}-conformance ]; then
37 echo "# Generating repors"
38 yes | rm $MY_PROJFOLDER/reports/${tenv}-conformance/*
39else
40 mkdir $MY_PROJFOLDER/reports/${tenv}-conformance
41fi
42cp ./artifacts/*.xml $MY_PROJFOLDER/reports/${tenv}-conformance/
43cd $MY_PROJFOLDER/reports/
44tparser -f r_xml --omit-status SKIP --force-single -d -r $MY_CLIENTSHORTNAME-${tenv}-conformance-latest.html $MY_PROJFOLDER/reports/${tenv}-conformance/
45cd $MY_PROJFOLDER