make sure the unittest pass withouth SSL
This commit is contained in:
parent
adcbf0d208
commit
bab2295fc3
4
makefile
4
makefile
@ -84,6 +84,10 @@ test_mbedtls:
|
|||||||
mkdir -p build && (cd build ; cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_MBED_TLS=1 -DUSE_TEST=1 .. ; make -j 4)
|
mkdir -p build && (cd build ; cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_MBED_TLS=1 -DUSE_TEST=1 .. ; make -j 4)
|
||||||
(cd test ; python2.7 run.py -r)
|
(cd test ; python2.7 run.py -r)
|
||||||
|
|
||||||
|
test_no_ssl:
|
||||||
|
mkdir -p build && (cd build ; cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_TEST=1 .. ; make -j 4)
|
||||||
|
(cd test ; python2.7 run.py -r)
|
||||||
|
|
||||||
ws_test: ws
|
ws_test: ws
|
||||||
(cd ws ; env DEBUG=1 PATH=../ws/build:$$PATH bash test_ws.sh)
|
(cd ws ; env DEBUG=1 PATH=../ws/build:$$PATH bash test_ws.sh)
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ TEST_CASE("http_client", "[http]")
|
|||||||
REQUIRE(response->statusCode == 200);
|
REQUIRE(response->statusCode == 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef IXWEBSOCKET_USE_TLS
|
||||||
SECTION("Connect to a remote HTTPS server")
|
SECTION("Connect to a remote HTTPS server")
|
||||||
{
|
{
|
||||||
HttpClient httpClient;
|
HttpClient httpClient;
|
||||||
@ -91,6 +92,7 @@ TEST_CASE("http_client", "[http]")
|
|||||||
REQUIRE(response->errorCode == HttpErrorCode::Ok);
|
REQUIRE(response->errorCode == HttpErrorCode::Ok);
|
||||||
REQUIRE(response->statusCode == 200);
|
REQUIRE(response->statusCode == 200);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SECTION("Async API, one call")
|
SECTION("Async API, one call")
|
||||||
{
|
{
|
||||||
@ -102,7 +104,7 @@ TEST_CASE("http_client", "[http]")
|
|||||||
tlsOptions.caFile = "cacert.pem";
|
tlsOptions.caFile = "cacert.pem";
|
||||||
httpClient.setTLSOptions(tlsOptions);
|
httpClient.setTLSOptions(tlsOptions);
|
||||||
|
|
||||||
std::string url("https://httpbin.org/");
|
std::string url("http://httpbin.org/");
|
||||||
auto args = httpClient.createRequest(url);
|
auto args = httpClient.createRequest(url);
|
||||||
|
|
||||||
args->extraHeaders = headers;
|
args->extraHeaders = headers;
|
||||||
|
Loading…
Reference in New Issue
Block a user