reduce test make targets, organize test file structure (#5931)

* reduce test make targets, organize test file structure

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* remove report collection

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
This commit is contained in:
Anand Kumar Singh
2022-07-13 11:02:11 +05:30
committed by GitHub
parent 2ae27e9dcd
commit c7f3f3b1d1
33 changed files with 71 additions and 421 deletions

View File

@@ -30,6 +30,5 @@ oc whoami
# Operatorhub integration tests
make test-operator-hub
cp -r tests/reports $ARTIFACT_DIR
oc logout

View File

@@ -28,20 +28,14 @@ oc whoami
# Integration tests
make test-integration || error=true
make test-integration-devfile || error=true
make test-cmd-login-logout || error=true
make test-cmd-project || error=true
# Interactive tests
make test-interactive || error=true
# E2e tests
make test-e2e-all || error=true
make test-e2e || error=true
if [ $error ]; then
exit -1
fi
cp -r reports tests/reports $ARTIFACT_DIR
oc logout

View File

@@ -1,68 +0,0 @@
#!/bin/sh
# fail if some commands fails
set -e
# show commands
set -x
ARCH=$(uname -m)
export CI="openshift"
if [ "${ARCH}" == "s390x" ]; then
make configure-installer-tests-cluster-s390x
elif [ "${ARCH}" == "ppc64le" ]; then
make configure-installer-tests-cluster-ppc64le
else
make configure-installer-tests-cluster
fi
make bin
mkdir -p $GOPATH/bin
make goget-ginkgo
export PATH="$PATH:$(pwd):$GOPATH/bin"
export CUSTOM_HOMEDIR=$ARTIFACT_DIR
# Copy kubeconfig to temporary kubeconfig file
# Read and Write permission to temporary kubeconfig file
TMP_DIR=$(mktemp -d)
cp $KUBECONFIG $TMP_DIR/kubeconfig
chmod 640 $TMP_DIR/kubeconfig
export KUBECONFIG=$TMP_DIR/kubeconfig
# Login as developer
oc login -u developer -p password@123
# Check login user name for debugging purpose
oc whoami
if [ "${ARCH}" == "s390x" ]; then
# Integration tests
make test-integration
make test-cmd-login-logout
make test-cmd-project
# E2e tests
make test-e2e-all
elif [ "${ARCH}" == "ppc64le" ]; then
# Integration tests
make test-integration
make test-cmd-login-logout
make test-cmd-project
# E2e tests
make test-e2e-all
else
# Integration tests
make test-integration || error=true
make test-integration-devfile || error=true
make test-cmd-login-logout || error=true
make test-cmd-project || error=true
# E2e tests
make test-e2e-all || error=true
# Fail the build if there is any error while test execution
if [ $error ]; then
exit -1
fi
fi
cp -r reports $ARTIFACT_DIR
oc logout

View File

@@ -35,32 +35,19 @@ oc whoami
if [ "${ARCH}" == "s390x" ]; then
# Integration tests
make test-integration
make test-integration-devfile
make test-cmd-login-logout
make test-cmd-project
# E2e tests
make test-e2e-all
make test-e2e
elif [ "${ARCH}" == "ppc64le" ]; then
# Integration tests
make test-integration
make test-integration-devfile
make test-cmd-login-logout
make test-cmd-project
# E2e tests
make test-e2e-all
make test-e2e
else
# Integration tests
make test-integration || error=true
make test-interactive || error=true
make test-integration-devfile || error=true
make test-cmd-login-logout || error=true
make test-cmd-project || error=true
# Interactive tests
make test-interactive || error=true
# E2e tests
make test-e2e-all || error=true
make test-e2e || error=true
# Fail the build if there is any error while test execution
if [ $error ]; then
@@ -68,6 +55,5 @@ else
fi
fi
cp -r reports tests/reports $ARTIFACT_DIR
oc logout