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