Add temporary http server for casperjs tests

Added a static folder and spawn a small HTTP server on runtests.
This is not really the best solution, as it uses pythons
simpleHTTPServer, but it works for now

refs #4315
This commit is contained in:
Jannis Moßhammer 2013-06-14 15:49:21 +02:00 committed by Marius Hein
parent 8d1038e622
commit e075db3800
3 changed files with 17 additions and 4 deletions

View File

@ -7,12 +7,15 @@ i2w = require('./i2w-config');
var casper = i2w.getTestEnv();
casper.start("http://build.icinga.org/jenkins");
casper.start("http://localhost:12999/empty.html");
casper.then(function() {
this.test.assertTitle("icinga-web test [Jenkins]", "The jenkins page");
casper.log(this.test);
this.test.assertTitle("Just an empty page");
});
casper.run(function() {
this.test.done();
});

View File

@ -108,8 +108,11 @@ if [ "$EXCLUDE" != "" ];then
fi
FILELIST=`echo $FILELIST | grep -v "$NAME"`
fi;
cd $DIR/static
python -m SimpleHTTPServer 12999&
PID=$!
cd $DIR
echo $EXEC $FILELIST
$EXEC $FILELIST
kill $PID
exit 0

View File

@ -0,0 +1,7 @@
<html>
<head>
<title>Just an empty page</title>
</head>
<body>
</body>
</html>