forked from redhat-developer/odo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pushing this to get some initial feedback on the structure \ of the test cases. * The tests are writting using ginkgo so that it is easier to \ manage the tests going forward * We aren't adhering to the standard requirements of BDD, but \ mapping usecases in ginkgo seems covenient * For starters, we have picked up Usecase redhat-developer#5
- Loading branch information
Showing
216 changed files
with
191,870 additions
and
51 deletions.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/bin/sh | ||
|
||
# Config | ||
# oc_bin_source='https://github.com/openshift/origin/releases/download/v3.7.2/openshift-origin-client-tools-v3.7.2-282e43f-linux-64bit.tar.gz' | ||
|
||
# wget $oc_bin_source -O /tmp/oc.tar.gz 2> /dev/null > /dev/null | ||
# mkdir /tmp/ocdir && cd /tmp/ocdir && tar -xvvf /tmp/oc.tar.gz > /dev/null | ||
# sudo mv /tmp/ocdir/*/oc /usr/bin/ | ||
|
||
sudo service docker stop | ||
|
||
sudo sed -i -e 's/sock/sock --insecure-registry 172.30.0.0\/16/' /etc/default/docker | ||
sudo cat /etc/default/docker | ||
|
||
sudo service docker start | ||
sudo service docker status | ||
|
||
## chmod needs sudo, so all other commands are with sudo | ||
sudo mkdir -p /home/travis/gopath/origin | ||
sudo chmod -R 766 /home/travis/gopath/origin | ||
|
||
## download oc binary | ||
sudo wget https://github.com/openshift/origin/releases/download/v3.7.2/openshift-origin-client-tools-v3.7.2-282e43f-linux-64bit.tar.gz -O /home/travis/gopath/origin/openshift-origin-client-tools.tar.gz 2> /dev/null > /dev/null | ||
|
||
sudo wget https://github.com/openshift/origin/releases/download/v3.7.2/openshift-origin-server-v3.7.2-282e43f-linux-64bit.tar.gz -O /home/travis/gopath/origin/openshift-origin-server.tar.gz 2> /dev/null > /dev/null | ||
|
||
sudo ls -l /home/travis/gopath/origin | ||
|
||
sudo tar -xvzf /home/travis/gopath/origin/openshift-origin-client-tools.tar.gz --strip-components=1 -C /bin | ||
|
||
sudo tar -xvzf /home/travis/gopath/origin/openshift-origin-server.tar.gz --strip-components=1 -C /bin | ||
|
||
export PATH=$PATH:/home/travis/gopath/origin/ | ||
|
||
|
||
|
||
#sudo mount --make-shared / | ||
#sudo wget https://github.com/openshift/origin/releases/download/v3.7.2/openshift-origin-server-v3.7.2-282e43f-linux-64bit.tar.gz -O /tmp/openshift-origin-server.tar.gz | ||
|
||
#sudo tar -xvzf /tmp/openshift-origin-server.tar.gz --strip-components=1 -C /bin | ||
#sudo ls -l /bin | ||
oc version | ||
|
||
# below cmd is important to get oc working in ubuntu | ||
sudo docker run -v /:/rootfs -ti --rm --entrypoint=/bin/bash --privileged openshift/origin:v3.7.2 -c "mv /rootfs/bin/findmnt /rootfs/bin/findmnt.backup" | ||
|
||
#sudo mount --make-shared / | ||
|
||
built=false | ||
while true; do | ||
oc cluster up | ||
if [ "$?" -eq 0 ]; then | ||
./scripts/travis-check-pods.sh | ||
if [ "$?" -eq 0 ]; then | ||
built=true | ||
break | ||
fi | ||
fi | ||
echo "Retrying oc cluster up after failure" | ||
oc cluster down | ||
sleep 5 | ||
done | ||
|
||
#oc cluster status | ||
|
||
if [ "$built" == false ]; then | ||
exit 1 | ||
fi |
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,75 @@ | ||
#!/bin/bash | ||
|
||
oc login -u system:admin | ||
oc project default | ||
|
||
while true; do | ||
V=$(oc get dc docker-registry --template='{{index .status "latestVersion"}}') | ||
P=$(oc get pod docker-registry-$V-deploy --template='{{index .status "phase"}}') | ||
if [ "$?" -eq 0 ]; then | ||
echo phase is $P for docker-registry deploy $V | ||
if [ "$P" == "Failed" ]; then | ||
echo "registry deploy failed, try again" | ||
oc get pods | ||
oc rollout retry dc/docker-registry | ||
sleep 10 | ||
continue | ||
fi | ||
fi | ||
REG=$(oc get pod -l deploymentconfig=docker-registry --template='{{index .items 0 "status" "phase"}}') | ||
if [ "$?" -eq 0 ]; then | ||
break | ||
fi | ||
oc get pods | ||
echo "Waiting for registry pod" | ||
sleep 10 | ||
done | ||
|
||
while true; do | ||
REG=$(oc get pod -l deploymentconfig=docker-registry --template='{{index .items 0 "status" "phase"}}') | ||
if [ "$?" -ne 0 -o "$REG" == "Error" ]; then | ||
echo "Registy pod is in error state..." | ||
exit 1 | ||
fi | ||
if [ "$REG" == "Running" ]; then | ||
break | ||
fi | ||
sleep 5 | ||
done | ||
|
||
while true; do | ||
V=$(oc get dc router --template='{{index .status "latestVersion"}}') | ||
P=$(oc get pod router-$V-deploy --template='{{index .status "phase"}}') | ||
if [ "$?" -eq 0 ]; then | ||
echo phase is $P for router deploy $V | ||
if [ "$P" == "Failed" ]; then | ||
echo "router deploy failed, try again" | ||
oc get pods | ||
oc rollout retry dc/router | ||
sleep 10 | ||
continue | ||
fi | ||
fi | ||
REG=$(oc get pod -l deploymentconfig=router --template='{{index .items 0 "status" "phase"}}') | ||
if [ "$?" -eq 0 ]; then | ||
break | ||
fi | ||
oc get pods | ||
echo "Waiting for router pod" | ||
sleep 10 | ||
done | ||
|
||
|
||
while true; do | ||
REG=$(oc get pod -l deploymentconfig=router --template='{{index .items 0 "status" "phase"}}') | ||
if [ "$?" -ne 0 -o "$REG" == "Error" ]; then | ||
echo "Router pod is in error state..." | ||
exit 1 | ||
fi | ||
if [ "$REG" == "Running" ]; then | ||
break | ||
fi | ||
sleep 5 | ||
done | ||
|
||
echo "Registry and router pods are okay" |
Oops, something went wrong.