-
Notifications
You must be signed in to change notification settings - Fork 244
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
Add scripts for e2e test on psi #4658
Closed
Closed
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
c9e4485
add scripts for e2e test on psi
anandrkskd 8419e55
testing only e2e images
anandrkskd dc18db9
testing only e2e images
anandrkskd 3694aad
testing only e2e images
anandrkskd 0f3f900
testing inti-devfile tests
anandrkskd 8eb7860
testing intiegration tests
anandrkskd 954ef1f
testing operatorhub tests
anandrkskd 265f027
update test script for mac
anandrkskd 2088dab
fixing test on windows
anandrkskd a4b1d5f
fixing test on mac tests
anandrkskd 3607f07
rebase
anandrkskd afeb544
fixing test on mac tests
anandrkskd ee995ba
test operatorhub and e2e
anandrkskd 4c0172f
test e2e
anandrkskd 4ae7a5a
fix e2e on mac
anandrkskd 236f5f6
oc fix
anandrkskd ed46a53
Merge branch 'main' of https://github.com/openshift/odo into automate…
anandrkskd 704508f
Merge branch 'automate-psi-ci-e2e' of https://github.com/anandrkskd/o…
anandrkskd 696690d
Merge branch 'main' of https://github.com/openshift/odo into automate…
anandrkskd 0f6644f
fix oc and revert devfile test
anandrkskd 92c5621
fix testcase
anandrkskd f4dcd8d
fix testcase
anandrkskd 94dbba9
rebase- Merge branch 'main' of https://github.com/openshift/odo into …
anandrkskd b8a840d
increase build timeout
anandrkskd 9e02cc8
test operator hub
anandrkskd bbb2ad2
add oc describe and oc get for debug
anandrkskd 5e38362
for debug update
anandrkskd fe8a053
removing integration-devfile tests
anandrkskd 72f9743
removing integration test
anandrkskd 2a7df6f
fixing script
anandrkskd 117c6c0
Merge branch 'main' of https://github.com/openshift/odo into automate…
anandrkskd 73969aa
Merge branch 'main' of https://github.com/openshift/odo into automate…
anandrkskd 7d645c9
update debug statement
anandrkskd 9a9bbda
Merge branch 'main' of https://github.com/openshift/odo into automate…
anandrkskd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,20 @@ | ||
#!/bin/sh | ||
|
||
case $1 in | ||
|
||
win) | ||
export SENDQUEUE=amqp.ci.queue.win.e2e.send | ||
export SENDTOPIC=amqp.ci.topic.win.e2e.send | ||
export JOB_NAME=odo-windows-e2e-pr-build | ||
export SENDEXCHANGE=amqp.ci.exchange.win.e2e.send | ||
;; | ||
|
||
mac) | ||
export SENDQUEUE=amqp.ci.queue.mac.e2e.send | ||
export SENDTOPIC=amqp.ci.topic.mac.e2e.send | ||
export JOB_NAME=odo-mac-e2e-pr-build | ||
export SENDEXCHANGE=amqp.ci.exchange.mac.e2e.send | ||
;; | ||
esac | ||
|
||
. scripts/openshiftci-e2e-4x-psi-tests.sh |
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,92 @@ | ||
#!/usr/bin/env bash | ||
|
||
shout() { | ||
set +x | ||
echo -e "\n!!!!!!!!!!!!!!!!!!!!\n${1}\n!!!!!!!!!!!!!!!!!!!!\n" | ||
set -x | ||
} | ||
|
||
# Prep for integration/e2e | ||
shout "Building odo binaries" | ||
make bin | ||
|
||
# copy built odo to GOBIN | ||
cp -avf ./odo $GOBIN_TEMP/ | ||
shout "getting ginkgo" | ||
make goget-ginkgo | ||
|
||
# Integration tests | ||
shout "Testing against 4x cluster" | ||
|
||
shout "Logging into 4x cluster for some setup (logs hidden)" | ||
set +x | ||
oc login -u kubeadmin -p ${OCP4X_KUBEADMIN_PASSWORD} --insecure-skip-tls-verify ${OCP4X_API_URL} | ||
set -x | ||
|
||
shout "Doing some presetup" | ||
|
||
# Delete any projects with SCRIPT_IDENTITY PREFIX. This is GC from previous runs which fail before end of script cleanup | ||
for i in $(oc projects -q); do | ||
if [[ $i == "${SCRIPT_IDENTITY}"* ]]; then | ||
oc delete project $i | ||
fi | ||
done | ||
|
||
# Generate random project names to some tests | ||
export REDHAT_OPENJDK11_RHEL8_PROJECT="${SCRIPT_IDENTITY}$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)" | ||
export REDHAT_OPENJDK11_UBI8_PROJECT="${SCRIPT_IDENTITY}$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)" | ||
export REDHAT_NODEJS12_RHEL7_PROJECT="${SCRIPT_IDENTITY}$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)" | ||
export REDHAT_NODEJS12_UBI8_PROJECT="${SCRIPT_IDENTITY}$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)" | ||
export REDHAT_NODEJS14_UBI8_PROJECT="${SCRIPT_IDENTITY}$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)" | ||
|
||
# Create the namespace for e2e image test apply pull secret to the namespace | ||
for i in `echo "$REDHAT_OPENJDK11_RHEL8_PROJECT $REDHAT_NODEJS12_RHEL7_PROJECT $REDHAT_NODEJS12_UBI8_PROJECT $REDHAT_OPENJDK11_UBI8_PROJECT $REDHAT_NODEJS14_UBI8_PROJECT"`; do | ||
# create the namespace | ||
oc new-project $i | ||
# Applying pull secret to the namespace which will be used for pulling images from authenticated registry | ||
oc get secret pull-secret -n openshift-config -o yaml | sed "s/openshift-config/$i/g" | oc apply -f - | ||
# Let developer user have access to the project | ||
oc adm policy add-role-to-user edit developer | ||
done | ||
|
||
shout "Logging into 4x cluster as developer (logs hidden)" | ||
set +x | ||
oc login -u developer -p ${OCP4X_DEVELOPER_PASSWORD} --insecure-skip-tls-verify ${OCP4X_API_URL} | ||
set -x | ||
|
||
# # Integration tests | ||
#shout "Running integration Tests" | ||
make test-operator-hub || error=true | ||
#remove comments from test-integration & test-integration-devfile once #4606 https://github.com/openshift/odo/issues/4606 is resolved | ||
#make test-integration || error=true | ||
#make test-integration-devfile || error=true | ||
make test-cmd-devfile-catalog || error=true | ||
make test-cmd-devfile-exec || error=true | ||
make test-cmd-devfile-registry || error=true | ||
make test-cmd-login-logout || error=true | ||
make test-cmd-project || error=true | ||
|
||
|
||
# E2e tests | ||
shout "Running 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 | ||
|
||
shout "cleaning up post tests" | ||
shout "Logging into 4x cluster for cleanup (logs hidden)" | ||
set +x | ||
oc login -u kubeadmin -p ${OCP4X_KUBEADMIN_PASSWORD} --insecure-skip-tls-verify ${OCP4X_API_URL} | ||
set -x | ||
|
||
shout "Cleaning up some leftover projects" | ||
|
||
set +x | ||
for i in $(oc projects -q); do | ||
if [[ $i == "${SCRIPT_IDENTITY}"* ]]; then | ||
oc delete project $i | ||
fi | ||
done | ||
set -x |
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,59 @@ | ||
#!/usr/bin/env bash | ||
|
||
shout() { | ||
set +x | ||
echo -e "\n!!!!!!!!!!!!!!!!!!!!\n${1}\n!!!!!!!!!!!!!!!!!!!!\n" | ||
set -x | ||
} | ||
|
||
set -ex | ||
|
||
shout "Setting up some stuff" | ||
|
||
# Create a bin directory whereever script runs. This will be where all binaries that need to be in PATH will reside. | ||
mkdir bin artifacts | ||
# Change the default location of go's bin directory (without affecting GOPATH). This is where compiled binaries will end up by default | ||
# for eg go get ginkgo later on will produce ginkgo binary in GOBIN | ||
export GOBIN="`pwd`/bin" | ||
export GOBIN_TEMP=$GOBIN | ||
# Set kubeconfig to current dir. This ensures no clashes with other test runs | ||
export KUBECONFIG="`pwd`/config" | ||
export ARTIFACT_DIR=${ARTIFACT_DIR:-"`pwd`/artifacts"} | ||
export CUSTOM_HOMEDIR=$ARTIFACT_DIR | ||
export WORKDIR=${WORKDIR:-"`pwd`"} | ||
export GOCACHE=`pwd`/.gocache && mkdir $GOCACHE | ||
|
||
# This si one of the variables injected by ci-firewall. Its purpose is to allow scripts to handle uniqueness as needed | ||
SCRIPT_IDENTITY=${SCRIPT_IDENTITY:-"def-id"} | ||
export SKIP_USER_LOGIN_TESTS="true" | ||
|
||
shout "Getting oc binary" | ||
if [[ $BASE_OS == "linux" ]]; then | ||
set +x | ||
curl --connect-timeout 150 --max-time 2048 -k ${OCP4X_DOWNLOAD_URL}/${ARCH}/${BASE_OS}/oc.tar -o ./oc.tar | ||
set -x | ||
tar -C $GOBIN -xvf ./oc.tar && rm -rf ./oc.tar | ||
else | ||
set +x | ||
curl --connect-timeout 210 --max-time 2048 -k ${OCP4X_DOWNLOAD_URL}/${ARCH}/${BASE_OS}/oc.zip -o ./oc.zip | ||
set -x | ||
if [[ $BASE_OS == "windows" ]]; then | ||
GOBIN_TEMP=$GOBIN | ||
GOBIN="$(cygpath -pw $GOBIN)" | ||
CURRDIR="$(cygpath -pw $WORKDIR)" | ||
GOCACHE="$(cygpath -pw $GOCACHE)" | ||
powershell -Command "Expand-Archive -Path $CURRDIR\oc.zip -DestinationPath $GOBIN" | ||
chmod +x $GOBIN_TEMP/* | ||
fi | ||
if [[ $BASE_OS == "mac" ]]; then | ||
# Skiping download of oc binary for test due to bandwidth issue, binary from cluster is stored in ~/ocforodo dir in macmini | ||
#unzip ./oc.zip -d ~/go/bin/ && chmod +x ~/go/bin/oc | ||
unzip ./oc.zip -d $GOBIN && rm -rf ./oc.zip && chmod +x $GOBIN/oc | ||
PATH="$PATH:/usr/local/bin:/usr/local/go/bin" | ||
fi | ||
fi | ||
|
||
# Add GOBIN which is the bin dir we created earlier to PATH so any binaries there are automatically available in PATH | ||
export PATH=$PATH:$GOBIN | ||
|
||
#----------------------------------------------------------------------------- |
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
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not run
integration-devfile
instead of each test separately?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are facing issues in which
odo push
is failing, this is mostly failing on integration,integration-devfile tests. so for now we are just testing those parts that doesn't requireodo push
in integration, integration-devfile suites.