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:
parent
8d1038e622
commit
e075db3800
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Just an empty page</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue