From 909b31a39127c71a178395d886ccaa8c6ab3f81e Mon Sep 17 00:00:00 2001 From: Artemii Bezguzikov Date: Tue, 8 Nov 2016 02:36:31 +0300 Subject: [PATCH] Add possibility to run callTomcat.sh from gui-tests in oder to check is tomcat setuped or not --- .idea/compiler.xml | 2 ++ .travis.yml | 4 +-- Travis/callTomcat.sh | 6 ++-- ui-testing/pom.xml | 29 +++++++++++++++++++ ui-testing/{UI-testing.iml => ui-testing.iml} | 1 - 5 files changed, 36 insertions(+), 6 deletions(-) rename ui-testing/{UI-testing.iml => ui-testing.iml} (98%) diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 24ecec99..203e398e 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -32,6 +32,7 @@ + @@ -49,6 +50,7 @@ + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 1c75c986..1e21b6e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ before_install: install: #install and run tests - mvn install -P travis - - cd UI-testing + - cd ui-testing - mvn install -DskipTests - cd .. @@ -79,7 +79,7 @@ script: - ../Travis/callTomcat.sh - - cd ../UI-testing + - cd ../ui-testing - mvn test -P travis & - sleep 30 diff --git a/Travis/callTomcat.sh b/Travis/callTomcat.sh index dd965f75..a5048a0d 100755 --- a/Travis/callTomcat.sh +++ b/Travis/callTomcat.sh @@ -1,7 +1,7 @@ #!/bin/bash iter=1 all=120 -until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:8080/auth | grep '302 Found'`" != "" ]; +until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:"${1:-"8080"}"/auth | grep '302 Found'`" != "" ]; do if [ "$iter" -lt "$all" ] then @@ -16,7 +16,7 @@ done echo "auth-service found" iter=1 all=120 -until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:8082/dashboard | grep '302 Found'`" != "" ]; +until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:"${2:-"8082"}"/dashboard | grep '302 Found'`" != "" ]; do if [ "$iter" -lt "$all" ] then @@ -31,7 +31,7 @@ done echo "dashboard-service found" iter=1 all=120 -until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:8081/editor | grep '302 Found'`" != "" ]; +until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:"${3:-"8082"}"/editor | grep '302 Found'`" != "" ]; do if [ "$iter" -lt "$all" ] then diff --git a/ui-testing/pom.xml b/ui-testing/pom.xml index 0aade41d..d43ad85a 100644 --- a/ui-testing/pom.xml +++ b/ui-testing/pom.xml @@ -15,6 +15,10 @@ ../pom.xml + + true + + @@ -44,6 +48,31 @@ 1.8 + + + exec-maven-plugin + org.codehaus.mojo + + + Check services + generate-sources + + exec + + + ${scanner} + ${basedir}/../Travis/callTomcat.sh + + 8080 + 8080 + 8080 + + + + + + + diff --git a/ui-testing/UI-testing.iml b/ui-testing/ui-testing.iml similarity index 98% rename from ui-testing/UI-testing.iml rename to ui-testing/ui-testing.iml index 29ca1c39..4f30c366 100644 --- a/ui-testing/UI-testing.iml +++ b/ui-testing/ui-testing.iml @@ -11,7 +11,6 @@ -