8000 testing full · java-operator-sdk/samples@efedf39 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 4, 2022. It is now read-only.

Commit efedf39

Browse files
testing full
1 parent d5b9048 commit efedf39

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.github/workflows/TomcatIntegrationTest.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
run: mvn -B test -q --file tomcat/pom.xml
4848

4949
- name: Get webapps
50-
if: ${{ failure() }}
50+
#if: ${{ failure() }}
5151
run: |
5252
kubectl get tomcats,webapps -A -o yaml | tee -a debug
53-
kubectl logs
53+
kubectl -n tomcat-test -c tomcat logs -l app=test-tomcat1 | grep startup
5454
5555
tomcat_local_apply_setup_test:
5656
runs-on: ubuntu-latest
@@ -182,5 +182,27 @@ jobs:
182182
echo "loop number $LOOP" &&\
183183
sleep 5; \
184184
done
185+
#Waiting 5 seconds for Tomcat to unpack the downloaded war
186+
sleep 5;
185187
186-
188+
- name: Get webapps
189+
#if: ${{ failure() }}
190+
run: |
191+
kubectl get tomcats,webapps -A -o yaml | tee -a debug
192+
kubectl -n tomcat-test -c tomcat logs -l app=test-tomcat1 | grep startup
193+
194+
- name: check code
195+
run: |
196+
kubectl -n tomcatoperator-sample run sample1 --labels=app=curl --image=curlimages/curl:7.78.0 --restart=Never --timeout=30s --command -- curl -s -v http://test-tomcat1/mysample/;
197+
kubectl -n tomcatoperator-sample run sample2 --labels=app=curl --image=curlimages/curl:7.78.0 --restart=Never --timeout=30s --command -- curl -s -v http://test-tomcat2/othercontext/;
198+
LOOP=0 &&\
199+
while [[ $(kubectl get pods -n tomcatoperator-sample -l app=curl -o 'jsonpath={..status.phase}') != "Succeeded Succeeded" ]]; do \
200+
echo "waiting for pod" &&\
201+
kubectl logs -n tomcatoperator-sample -l app=curl &&\
202+
(( LOOP++ )) &&\
203+
if [[ $LOOP -gt 5 ]]; then exit 1; fi &&\
204+
echo "loop number $LOOP" &&\
205+
sleep 5; \
206+
done
207+
if [[ $(kubectl logs -n tomcatoperator-sample sample1 --tail=500 | grep tomcat.gif | wc -l) -ne 1 ]]; then exit 1; fi
208+
if [[ $(kubectl logs -n tomcatoperator-sample sample2 --tail=500 | grep dog.jpeg | wc -l) -ne 1 ]]; then exit 1; fi

0 commit comments

Comments
 (0)
0