loolwsd: fix tests to build again

This commit is contained in:
Miklos Vajna 2016-01-05 21:32:53 +01:00
parent 82c455ef94
commit e3e4c4d6f3
2 changed files with 5 additions and 4 deletions

View file

@ -16,7 +16,7 @@
#include <Poco/URI.h>
#include <cppunit/extensions/HelperMacros.h>
#include <LOOLWSD.hpp>
#include <Common.hpp>
/// Tests the HTTP POST API of loolwsd. The server has to be started manually before running this test.
class HTTPPostTest : public CPPUNIT_NS::TestFixture
@ -30,7 +30,7 @@ class HTTPPostTest : public CPPUNIT_NS::TestFixture
void HTTPPostTest::testConvertTo()
{
Poco::URI uri("http://127.0.0.1:" + std::to_string(LOOLWSD::DEFAULT_CLIENT_PORT_NUMBER));
Poco::URI uri("http://127.0.0.1:" + std::to_string(ClientPortNumber));
Poco::Net::HTTPClientSession session(uri.getHost(), uri.getPort());
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, "/convert-to");

View file

@ -11,12 +11,13 @@
#include <Poco/Net/HTTPRequest.h>
#include <Poco/Net/HTTPResponse.h>
#include <Poco/Net/WebSocket.h>
#include <Poco/Path.h>
#include <Poco/StringTokenizer.h>
#include <Poco/URI.h>
#include <cppunit/extensions/HelperMacros.h>
#include <LOOLProtocol.hpp>
#include <LOOLWSD.hpp>
#include <Common.hpp>
/// Tests the HTTP WebSocket API of loolwsd. The server has to be started manually before running this test.
class HTTPWSTest : public CPPUNIT_NS::TestFixture
@ -38,7 +39,7 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture
void sendTextFrame(Poco::Net::WebSocket& socket, const std::string& string);
public:
HTTPWSTest()
: _uri("http://127.0.0.1:" + std::to_string(LOOLWSD::DEFAULT_CLIENT_PORT_NUMBER)),
: _uri("http://127.0.0.1:" + std::to_string(ClientPortNumber)),
_session(_uri.getHost(), _uri.getPort()),
_request(Poco::Net::HTTPRequest::HTTP_POST, "/ws"),
_socket(_session, _request, _response)