Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ include 'test:webapps:bookstore-spring'
include ':test:smoke'
include ':test:smoke:appServers'
include ':test:smoke:appServers:Tomcat.7'
include ':test:smoke:appServers:Tomcat.8'
include ':test:smoke:testApps'

include ':test:smoke:framework:testCore'
Expand Down
4 changes: 4 additions & 0 deletions test/smoke/appServers/Tomcat.8/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

ext {
appServerShortName = 'tomcat8'
}
21 changes: 21 additions & 0 deletions test/smoke/appServers/Tomcat.8/resources/linux/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

if [ -z "$CATALINA_HOME" ]; then
echo "\$CATALINA_HOME not set" >&2
exit 1
fi

if [ -z "$1" ]; then
echo "Nothing given to deploy"
exit 0
fi

if [ ! -e $1 ]; then
echo "File '$1' does not exist" >&2
exit 2
fi

WARFILE=`readlink -f $1`
BASEPATH=`basename $WARFILE .war`

cp $WARFILE $CATALINA_HOME/webapps
8 changes: 8 additions & 0 deletions test/smoke/appServers/Tomcat.8/resources/linux/startServer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

if [ -z "$CATALINA_HOME" ]; then
echo "\$CATALINA_HOME not set" >&2
exit 1
fi

$CATALINA_HOME/bin/catalina.sh run
8 changes: 8 additions & 0 deletions test/smoke/appServers/Tomcat.8/resources/linux/stopServer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

if [ -z "$CATALINA_HOME" ]; then
echo "\$CATALINA_HOME not set" >&2
exit 1
fi

$CATALINA_HOME/bin/shutdown.sh
24 changes: 24 additions & 0 deletions test/smoke/appServers/Tomcat.8/resources/linux/tailLastLog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

if [ -z "$CATALINA_HOME" ]; then
echo "\$CATALINA_HOME not set" >&2
exit 1
fi

TODAYS_DATE=`date +%Y-%m-%d`
LOG_FILE=$CATALINA_HOME/logs/catalina.$TODAYS_DATE.log

if [ ! -z "$1" ]; then
LOG_FILE=$1
fi

NUM_LINES=50
if [ ! -z "$2" ]; then
NUM_LINES=$2
fi

if ! tail -v -n$NUM_LINES $LOG_FILE; then
echo "USAGE: tailLastLog.sh [logfile] [numlines]"
echo " logfile - absolute path to logfile to tail (default="
echo " numlines - number of lines to taile (default=50)"
fi
18 changes: 18 additions & 0 deletions test/smoke/appServers/Tomcat.8/resources/linux/undeploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [ -z "$CATALINA_HOME" ]; then
echo "\$CATALINA_HOME not set" >&2
exit 1
fi

if [ -z "$1" ]; then
echo "Nothing given to undeploy"
exit 0
fi

if [ ! -e $CATALINA_HOME/webapps/$1 ]; then
echo "WAR File '$1' does not exist" >&2
exit 2
fi

rm $CATALINA_HOME/webapps/$1
35 changes: 35 additions & 0 deletions test/smoke/appServers/Tomcat.8/tomcat8.linux.partial.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM @JRE@

USER root
WORKDIR /root/docker-compile

# TODO add label?

RUN mkdir /root/docker-stage

# update packages and install dependencies: wget
RUN apt-get update \
&& apt-get install -y wget

RUN apt-get install -y procps


ENV TOMCAT_MAJOR_VERSION 8
ENV TOMCAT_FULL_VERSION 8.0.50

# install tomcat (FXIME gpg?)
RUN wget https://archive.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR_VERSION/v$TOMCAT_FULL_VERSION/bin/apache-tomcat-$TOMCAT_FULL_VERSION.tar.gz \
&& wget https://archive.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR_VERSION/v$TOMCAT_FULL_VERSION/bin/apache-tomcat-$TOMCAT_FULL_VERSION.tar.gz.sha1 \
&& sha1sum --check apache-tomcat-$TOMCAT_FULL_VERSION.tar.gz.sha1 \
&& tar xzvf apache-tomcat-$TOMCAT_FULL_VERSION.tar.gz \
&& mv ./apache-tomcat-$TOMCAT_FULL_VERSION /opt/apache-tomcat-$TOMCAT_FULL_VERSION

ENV CATALINA_HOME /opt/apache-tomcat-$TOMCAT_FULL_VERSION
ENV CATALINA_BASE /opt/apache-tomcat-$TOMCAT_FULL_VERSION

ADD ./*.sh /root/docker-stage/

EXPOSE 8080

WORKDIR /root/docker-stage
CMD ./startServer.sh
4 changes: 1 addition & 3 deletions test/smoke/appServers/jre.master.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
openjdk:7-jre
openjdk:8-jre
openjdk:9-jre
azul/zulu-openjdk:7
azul/zulu-openjdk:8
azul/zulu-openjdk:9
azul/zulu-openjdk:8
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public abstract class AiSmokeTest {
@Parameters(name = "{index}: {0}, {1}, {2}")
public static Collection<Object[]> parameterGenerator() throws MalformedURLException, IOException {
List<String> appServers = Resources.readLines(Resources.getResource("appServers.txt"), Charsets.UTF_8);
System.out.println("Target appservers="+Arrays.toString(appServers.toArray()));
String os = System.getProperty("applicationinsights.smoketest.os", "linux");
Multimap<String, String> appServers2jres = HashMultimap.create();
for (String appServer : appServers) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
tomcat8
tomcat7