commit
a5ea315fe1
@ -30,7 +30,7 @@
|
|||||||
"guzzlehttp/psr7": "^2 || ^1.7"
|
"guzzlehttp/psr7": "^2 || ^1.7"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "5.7.*",
|
"phpunit/phpunit": "^5.7",
|
||||||
"react/socket": "^1.3"
|
"react/socket": "^1.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -17,7 +17,7 @@ require __DIR__ . '/../bootstrap.php';
|
|||||||
|
|
||||||
define('AGENT', 'RatchetRFC/0.3');
|
define('AGENT', 'RatchetRFC/0.3');
|
||||||
|
|
||||||
$testServer = "127.0.0.1";
|
$testServer = $argc > 1 ? $argv[1] : "127.0.0.1";
|
||||||
|
|
||||||
$loop = React\EventLoop\Factory::create();
|
$loop = React\EventLoop\Factory::create();
|
||||||
|
|
||||||
@ -57,9 +57,9 @@ function getTestCases() {
|
|||||||
|
|
||||||
$deferred = new Deferred();
|
$deferred = new Deferred();
|
||||||
|
|
||||||
$connector->connect($testServer . ':9001')->then(function (ConnectionInterface $connection) use ($deferred) {
|
$connector->connect($testServer . ':9002')->then(function (ConnectionInterface $connection) use ($deferred, $testServer) {
|
||||||
$cn = new ClientNegotiator();
|
$cn = new ClientNegotiator();
|
||||||
$cnRequest = $cn->generateRequest(new Uri('ws://127.0.0.1:9001/getCaseCount'));
|
$cnRequest = $cn->generateRequest(new Uri('ws://' . $testServer . ':9002/getCaseCount'));
|
||||||
|
|
||||||
$rawResponse = "";
|
$rawResponse = "";
|
||||||
$response = null;
|
$response = null;
|
||||||
@ -122,10 +122,10 @@ function runTest($case)
|
|||||||
|
|
||||||
$deferred = new Deferred();
|
$deferred = new Deferred();
|
||||||
|
|
||||||
$connector->connect($testServer . ':9001')->then(function (ConnectionInterface $connection) use ($deferred, $casePath, $case) {
|
$connector->connect($testServer . ':9002')->then(function (ConnectionInterface $connection) use ($deferred, $casePath, $case, $testServer) {
|
||||||
$cn = new ClientNegotiator(
|
$cn = new ClientNegotiator(
|
||||||
PermessageDeflateOptions::permessageDeflateSupported() ? PermessageDeflateOptions::createEnabled() : null);
|
PermessageDeflateOptions::permessageDeflateSupported() ? PermessageDeflateOptions::createEnabled() : null);
|
||||||
$cnRequest = $cn->generateRequest(new Uri('ws://127.0.0.1:9001' . $casePath));
|
$cnRequest = $cn->generateRequest(new Uri('ws://' . $testServer . ':9002' . $casePath));
|
||||||
|
|
||||||
$rawResponse = "";
|
$rawResponse = "";
|
||||||
$response = null;
|
$response = null;
|
||||||
@ -181,12 +181,12 @@ function createReport() {
|
|||||||
|
|
||||||
$deferred = new Deferred();
|
$deferred = new Deferred();
|
||||||
|
|
||||||
$connector->connect($testServer . ':9001')->then(function (ConnectionInterface $connection) use ($deferred) {
|
$connector->connect($testServer . ':9002')->then(function (ConnectionInterface $connection) use ($deferred, $testServer) {
|
||||||
// $reportPath = "/updateReports?agent=" . AGENT . "&shutdownOnComplete=true";
|
// $reportPath = "/updateReports?agent=" . AGENT . "&shutdownOnComplete=true";
|
||||||
// we will stop it using docker now instead of just shutting down
|
// we will stop it using docker now instead of just shutting down
|
||||||
$reportPath = "/updateReports?agent=" . AGENT;
|
$reportPath = "/updateReports?agent=" . AGENT;
|
||||||
$cn = new ClientNegotiator();
|
$cn = new ClientNegotiator();
|
||||||
$cnRequest = $cn->generateRequest(new Uri('ws://127.0.0.1:9001' . $reportPath));
|
$cnRequest = $cn->generateRequest(new Uri('ws://' . $testServer . ':9002' . $reportPath));
|
||||||
|
|
||||||
$rawResponse = "";
|
$rawResponse = "";
|
||||||
$response = null;
|
$response = null;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"url": "ws://127.0.0.1:9001"
|
"url": "ws://127.0.0.1:9002"
|
||||||
, "options": {
|
, "options": {
|
||||||
"failByDrop": false
|
"failByDrop": false
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"url": "ws://127.0.0.1:9001"
|
"url": "ws://127.0.0.1:9002"
|
||||||
, "options": {
|
, "options": {
|
||||||
"failByDrop": false
|
"failByDrop": false
|
||||||
}
|
}
|
||||||
|
@ -6,13 +6,13 @@ if [ "$ABTEST" = "client" ]; then
|
|||||||
-d \
|
-d \
|
||||||
-v ${PWD}:/config \
|
-v ${PWD}:/config \
|
||||||
-v ${PWD}/reports:/reports \
|
-v ${PWD}/reports:/reports \
|
||||||
-p 9001:9001 \
|
-p 9002:9002 \
|
||||||
--name fuzzingserver \
|
--name fuzzingserver \
|
||||||
crossbario/autobahn-testsuite wstest -m fuzzingserver -s /config/fuzzingserver$SKIP_DEFLATE.json
|
crossbario/autobahn-testsuite wstest -m fuzzingserver -s /config/fuzzingserver$SKIP_DEFLATE.json
|
||||||
sleep 5
|
sleep 5
|
||||||
if [ "$TRAVIS" != "true" ]; then
|
if [ "$TRAVIS" != "true" ]; then
|
||||||
echo "Running tests vs Autobahn test client"
|
echo "Running tests vs Autobahn test client"
|
||||||
###docker run -it --rm --name abpytest crossbario/autobahn-testsuite wstest --mode testeeclient -w ws://host.docker.internal:9001
|
###docker run -it --rm --name abpytest crossbario/autobahn-testsuite wstest --mode testeeclient -w ws://host.docker.internal:9002
|
||||||
fi
|
fi
|
||||||
php -d memory_limit=256M clientRunner.php
|
php -d memory_limit=256M clientRunner.php
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ if [ "$ABTEST" = "server" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-it \
|
-i \
|
||||||
-v ${PWD}:/config \
|
-v ${PWD}:/config \
|
||||||
-v ${PWD}/reports:/reports \
|
-v ${PWD}/reports:/reports \
|
||||||
--name fuzzingclient \
|
--name fuzzingclient \
|
||||||
@ -46,5 +46,3 @@ if [ "$ABTEST" = "server" ]; then
|
|||||||
# send the shutdown command to the PHP echo server
|
# send the shutdown command to the PHP echo server
|
||||||
wget -O - -q http://127.0.0.1:9001/shutdown
|
wget -O - -q http://127.0.0.1:9001/shutdown
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user