Skip to content
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

feat: add the script (from @cmoulliard) to execute rhte scenario automatically #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aureamunoz
Copy link
Collaborator

I think it's a good idea to have this useful script here.

@@ -98,6 +98,9 @@ kubectl get ingress/hello-world

Copy/paste the address displayed within the terminal in a browser and say Hello world 😉

## Tests

The script `end-to-end.sh` allows to execute automatically a test end to end given a valid connection to an Openshift cluster where a Halkyon operator is installed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need also kubedb. I suggest that you add the link about how to install halkyon from the halkyon project. ... where a Halkyon operator is installed -> where a Halkyon operator is installed - see doc = link

Comment on lines +84 to +90
# PROJECT=fruit-client-sb
# NAMESPACE=test
# POD_ID=$(oc get pod -lapp=$PROJECT -n $NAMESPACE -o name | awk -F '/' '{print $2}')
# oc cp $PROJECT/pom.xml $POD_ID:/usr/src/ -n $NAMESPACE
# oc cp $PROJECT/src $POD_ID:/usr/src/ -n $NAMESPACE
# oc exec $POD_ID -n $NAMESPACE /var/lib/supervisord/bin/supervisord ctl start build
# oc exec $POD_ID -n $NAMESPACE /var/lib/supervisord/bin/supervisord ctl start run
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the comments

Comment on lines +93 to +99
# PROJECT=fruit-backend-sb
# NAMESPACE=test
# POD_ID=$(oc get pod -lapp=$PROJECT -n $NAMESPACE -o name | awk -F '/' '{print $2}')
# oc cp $PROJECT/pom.xml $POD_ID:/usr/src/ -n $NAMESPACE
# oc cp $PROJECT/src $POD_ID:/usr/src/ -n $NAMESPACE
# oc exec $POD_ID -n $NAMESPACE /var/lib/supervisord/bin/supervisord ctl start build
# oc exec $POD_ID -n $NAMESPACE /var/lib/supervisord/bin/supervisord ctl start run
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the comments

echo "########################"
sleep 120s
BACKEND_URL=$(oc get routes/fruit-backend-sb --template={{.spec.host}})
http -s solarized POST "http://${BACKEND_URL}/api/fruits" name=Orange
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment top of the README file to explain that curl or httpie (depending which one is used) must be installed.

!! Be carefull as this script will not test the endpoint to check if the output matches our expectation. Such step is part of the circleci end to end script used on halkyon operator

@metacosm
Copy link
Contributor

metacosm commented Oct 4, 2019

Adding this script is only useful if it can be used as-is, which I don't think is the case right now since it relies on several assumptions like the existence of ~/Temp or the fact that you have oc installed and connect to a cluster where you can create a test namespace. So I would rather see a more generic version of this script that could be turned into a real end to end test that could be used in CircleCI for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants