Relocate test projects under spring-boot-tests

Move integration and deployment tests under a single `spring-boot-tests`
module.

See gh-9316
This commit is contained in:
Phillip Webb
2017-09-28 22:52:53 -07:00
parent 0ba4830b4f
commit 89b0ba2c14
85 changed files with 0 additions and 0 deletions

View File

@@ -1,5 +0,0 @@
source ./test-functions.sh
install_service
start_service
await_app
curl -s http://127.0.0.1:8080/

View File

@@ -1,4 +0,0 @@
source ./test-functions.sh
install_service
force_stop_service
echo "Status: $?"

View File

@@ -1,6 +0,0 @@
source ./test-functions.sh
install_double_link_service
echo 'JAVA_OPTS=-Dserver.port=8081' > /test-service/spring-boot-app.conf
start_service
await_app http://127.0.0.1:8081/
curl -s http://127.0.0.1:8081/

View File

@@ -1,5 +0,0 @@
source ./test-functions.sh
install_service
start_service --server.port=8081 --server.servlet.context-path=/test
await_app http://127.0.0.1:8081/test/
curl -s http://127.0.0.1:8081/test/

View File

@@ -1,6 +0,0 @@
source ./test-functions.sh
install_service
echo 'JAVA_OPTS="-Dserver.port=8081 -Dserver.servlet.context-path=/test"' > /test-service/spring-boot-app.conf
start_service
await_app http://127.0.0.1:8081/test/
curl -s http://127.0.0.1:8081/test/

View File

@@ -1,6 +0,0 @@
source ./test-functions.sh
install_service
echo 'RUN_ARGS="--server.port=8081 --server.servlet.context-path=/test"' > /test-service/spring-boot-app.conf
start_service
await_app http://127.0.0.1:8081/test/
curl -s http://127.0.0.1:8081/test/

View File

@@ -1,8 +0,0 @@
source ./test-functions.sh
mkdir ./pid
install_service
echo 'LOG_FOLDER=log' > /test-service/spring-boot-app.conf
mkdir -p /test-service/log
start_service
await_app
[[ -s /test-service/log/spring-boot-app.log ]] && echo "Log written"

View File

@@ -1,10 +0,0 @@
source ./test-functions.sh
install_service
mkdir /test-service/pid
echo 'PID_FOLDER=pid' > /test-service/spring-boot-app.conf
start_service
echo "PID: $(cat /test-service/pid/spring-boot-app/spring-boot-app.pid)"
await_app
curl -s http://127.0.0.1:8080/
status_service
stop_service

View File

@@ -1,5 +0,0 @@
source ./test-functions.sh
install_service
start_service --server.port=8081
await_app http://127.0.0.1:8081/
curl -s http://127.0.0.1:8081/

View File

@@ -1,6 +0,0 @@
source ./test-functions.sh
install_service
echo 'JAVA_OPTS=-Dserver.port=8081' > /test-service/spring-boot-app.conf
start_service
await_app http://127.0.0.1:8081/
curl -s http://127.0.0.1:8081/

View File

@@ -1,6 +0,0 @@
source ./test-functions.sh
install_service
echo 'RUN_ARGS=--server.port=8081' > /test-service/spring-boot-app.conf
start_service
await_app http://127.0.0.1:8081/
curl -s http://127.0.0.1:8081/

View File

@@ -1,7 +0,0 @@
source ./test-functions.sh
chmod -x $(type -p start-stop-daemon)
install_service
echo 'USE_START_STOP_DAEMON=false' > /test-service/spring-boot-app.conf
start_service
await_app
curl -s http://127.0.0.1:8080/

View File

@@ -1,7 +0,0 @@
source ./test-functions.sh
install_service
start_service
echo "PID1: $(cat /var/run/spring-boot-app/spring-boot-app.pid)"
restart_service
echo "Status: $?"
echo "PID2: $(cat /var/run/spring-boot-app/spring-boot-app.pid)"

View File

@@ -1,5 +0,0 @@
source ./test-functions.sh
install_service
restart_service
echo "Status: $?"
echo "PID: $(cat /var/run/spring-boot-app/spring-boot-app.pid)"

View File

@@ -1,6 +0,0 @@
source ./test-functions.sh
install_service
start_service
echo "PID: $(cat /var/run/spring-boot-app/spring-boot-app.pid)"
start_service
echo "Status: $?"

View File

@@ -1,5 +0,0 @@
source ./test-functions.sh
install_service
start_service
echo "Status: $?"
echo "PID: $(cat /var/run/spring-boot-app/spring-boot-app.pid)"

View File

@@ -1,8 +0,0 @@
source ./test-functions.sh
install_service
start_service
pid=$(cat /var/run/spring-boot-app/spring-boot-app.pid)
echo "PID: $pid"
kill -9 $pid
status_service
echo "Status: $?"

View File

@@ -1,6 +0,0 @@
source ./test-functions.sh
install_service
start_service
status_service
echo "Status: $?"
echo "PID: $(cat /var/run/spring-boot-app/spring-boot-app.pid)"

View File

@@ -1,4 +0,0 @@
source ./test-functions.sh
install_service
status_service
echo "Status: $?"

View File

@@ -1,4 +0,0 @@
source ./test-functions.sh
install_service
stop_service
echo "Status: $?"

View File

@@ -1,53 +0,0 @@
install_service() {
mkdir /test-service
mv /spring-boot-launch-script-tests-*.jar /test-service/spring-boot-app.jar
chmod +x /test-service/spring-boot-app.jar
ln -s /test-service/spring-boot-app.jar /etc/init.d/spring-boot-app
}
install_double_link_service() {
mkdir /test-service
mv /spring-boot-launch-script-tests-*.jar /test-service/
chmod +x /test-service/spring-boot-launch-script-tests-*.jar
ln -s /test-service/spring-boot-launch-script-tests-*.jar /test-service/spring-boot-app.jar
ln -s /test-service/spring-boot-app.jar /etc/init.d/spring-boot-app
}
start_service() {
service spring-boot-app start $@
}
restart_service() {
service spring-boot-app restart
}
status_service() {
service spring-boot-app status
}
stop_service() {
service spring-boot-app stop
}
force_stop_service() {
service spring-boot-app force-stop
}
await_app() {
if [ -z $1 ]
then
url=http://127.0.0.1:8080
else
url=$1
fi
end=$(date +%s)
let "end+=30"
until curl -s $url > /dev/null
do
now=$(date +%s)
if [[ $now -ge $end ]]; then
break
fi
sleep 1
done
}