chore: fix e2e tests (#989)

* chore: fix e2e tests

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
pull/991/head
Anatolii Bazko 2021-08-03 13:52:45 +03:00 committed by GitHub
parent 34f0be0113
commit e6e31df6b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 43 additions and 45 deletions

View File

@ -76,7 +76,14 @@ EOL
cat /tmp/che-cr-patch.yaml
chectl server:deploy --che-operator-cr-patch-yaml=/tmp/che-cr-patch.yaml -p openshift --templates=${TEMPLATES} --batch --telemetry=off --installer=operator --che-operator-image=${OPERATOR_IMAGE}
chectl server:deploy \
--batch \
--che-operator-cr-patch-yaml=/tmp/che-cr-patch.yaml \
--platform openshift \
--templates=${TEMPLATES} \
--telemetry=off \
--installer=operator \
--che-operator-image=${OPERATOR_IMAGE}
}
startHappyPathTest() {

View File

@ -193,7 +193,14 @@ initDefaults
provisionOpenShiftOAuthUser
# Deploy Eclipse Che and retrieve golang devfile from devfile-registry
chectl server:deploy --telemetry=off --k8spodwaittimeout=1800000 --che-operator-cr-patch-yaml=/tmp/che-cr-patch.yaml --che-operator-image=${INTERNAL_REGISTRY_URL}/eclipse/che-operator:next --platform=openshift --installer=operator
chectl server:deploy \
--batch \
--telemetry=off \
--k8spodwaittimeout=1800000 \
--che-operator-cr-patch-yaml=/tmp/che-cr-patch.yaml \
--che-operator-image=${INTERNAL_REGISTRY_URL}/eclipse/che-operator:next \
--platform=openshift \
--installer=operator
DEVFILEURL=$(oc get checluster/eclipse-che -n eclipse-che -o "jsonpath={.status.devfileRegistryURL}")
curl -sSLo- -vk "${DEVFILEURL}/devfiles/go/devfile.yaml" > /tmp/devfile.yaml

View File

@ -42,7 +42,7 @@ runTests() {
createWorkspace
# Update Eclipse Che to next and start workspace
chectl server:update --yes --templates="${TEMPLATES}" --che-operator-image=${OPERATOR_IMAGE}
chectl server:update --batch --templates="${TEMPLATES}" --che-operator-image=${OPERATOR_IMAGE}
waitEclipseCheDeployed "next"
startExistedWorkspace
waitWorkspaceStart

19
.github/bin/common.sh vendored
View File

@ -28,7 +28,7 @@ catchFinish() {
initDefaults() {
export RAM_MEMORY=8192
export NAMESPACE="eclipse-che"
export USER_NAMEPSACE="che-che"
export USER_NAMEPSACE="admin-che"
export ARTIFACTS_DIR=${ARTIFACT_DIR:-"/tmp/artifacts-che"}
export TEMPLATES=${OPERATOR_REPO}/tmp
export OPERATOR_IMAGE="test/che-operator:test"
@ -97,7 +97,7 @@ initStableTemplates() {
if [ "${compareResult}" == "-1" ]; then
cp -rf ${lastOperatorPath}/deploy/* "${LAST_OPERATOR_TEMPLATE}/che-operator"
else
prepareTemplates "${lastOperatorPath}" "${LAST_OPERATOR_TEMPLATE}/che-operator"
prepareTemplates "${lastOperatorPath}" "${LAST_OPERATOR_TEMPLATE}/che-operator"
fi
}
@ -226,6 +226,7 @@ deployEclipseCheStable(){
local version=$3
chectl server:deploy \
--batch \
--platform=${platform} \
--installer ${installer} \
--chenamespace ${NAMESPACE} \
@ -286,7 +287,11 @@ updateEclipseChe() {
local image=$1
local templates=$2
chectl server:update --chenamespace=${NAMESPACE} -y --che-operator-image=${image} --templates=${templates}
chectl server:update \
--batch \
--chenamespace=${NAMESPACE} \
--che-operator-image=${image} \
--templates=${templates}
}
# Create and start a workspace
@ -454,7 +459,13 @@ spec:
nonProxyHosts: oauth-openshift.apps.$DOMAIN
EOL
chectl server:deploy --installer=operator --platform=openshift --batch --templates=${TEMPLATES} --che-operator-cr-patch-yaml=/tmp/che-cr-patch.yaml --che-operator-image ${OPERATOR_IMAGE}
chectl server:deploy \
--batch \
--installer=operator \
--platform=openshift \
--templates=${TEMPLATES} \
--che-operator-cr-patch-yaml=/tmp/che-cr-patch.yaml \
--che-operator-image ${OPERATOR_IMAGE}
oc get checluster eclipse-che -n eclipse-che -o yaml
}

View File

@ -29,26 +29,16 @@ runTest() {
startNewWorkspace
waitWorkspaceStart
# stop workspace to free some resources
# stop workspace to clean up resources
stopExistedWorkspace
waitExistedWorkspaceStop
kubectl delete namespace ${USER_NAMEPSACE}
deployCertManager
# Dev Workspace controller tests
enableDevWorkspaceEngine
waitDevWorkspaceControllerStarted
sleep 10s
createWorkspaceDevWorkspaceController
waitAllPodsRunning ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE}
kubectl delete namespace ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE}
sleep 60s
createWorkspaceDevWorkspaceCheOperator
waitAllPodsRunning ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE}
kubectl delete namespace ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE}
}
initDefaults

View File

@ -38,26 +38,16 @@ runTest() {
startNewWorkspace
waitWorkspaceStart
# stop workspace to free some resources
# stop workspace to clean up resources
stopExistedWorkspace
waitExistedWorkspaceStop
kubectl delete namespace ${USER_NAMEPSACE}
deployCertManager
# Dev Workspace controller tests
enableDevWorkspaceEngine
waitDevWorkspaceControllerStarted
sleep 10s
createWorkspaceDevWorkspaceController
waitAllPodsRunning ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE}
kubectl delete namespace ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE}
sleep 60s
createWorkspaceDevWorkspaceCheOperator
waitAllPodsRunning ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE}
kubectl delete namespace ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE}
}
initDefaults

View File

@ -37,26 +37,16 @@ runTest() {
startNewWorkspace
waitWorkspaceStart
# stop workspace to free some resources
# stop workspace to clean up resources
stopExistedWorkspace
waitExistedWorkspaceStop
kubectl delete namespace ${USER_NAMEPSACE}
deployCertManager
# Dev Workspace controller tests
enableDevWorkspaceEngine
waitDevWorkspaceControllerStarted
sleep 10s
createWorkspaceDevWorkspaceController
waitAllPodsRunning ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE}
kubectl delete namespace ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE}
sleep 60s
createWorkspaceDevWorkspaceCheOperator
waitAllPodsRunning ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE}
kubectl delete namespace ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE}
}
initDefaults

View File

@ -30,13 +30,16 @@ EOF
}
runTest() {
chectl server:deploy --platform minishift --installer operator \
chectl server:deploy \
--batch \
--platform minishift \
--installer operator \
--version ${PREVIOUS_PACKAGE_VERSION} \
--che-operator-cr-patch-yaml ${OPERATOR_REPO}/tmp/patch.yaml
createWorkspace
chectl server:update --version ${LAST_PACKAGE_VERSION} -y
chectl server:update --batch --templates=$LAST_OPERATOR_TEMPLATE
waitEclipseCheDeployed ${LAST_PACKAGE_VERSION}
startExistedWorkspace