mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Added test for libcurl https handling disabled on build server.
Linux docker image does not expose port 80
This commit is contained in:
parent
b6aeffb618
commit
f4f236e82e
5 changed files with 38 additions and 17 deletions
22
tests/slic3rutils/slic3rutils_tests_main.cpp
Normal file
22
tests/slic3rutils/slic3rutils_tests_main.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <catch_main.hpp>
|
||||
|
||||
#include "slic3r/Utils/Http.hpp"
|
||||
|
||||
TEST_CASE("Http", "[Http][NotWorking]") {
|
||||
|
||||
Slic3r::Http g = Slic3r::Http::get("https://github.com/");
|
||||
|
||||
unsigned status = 0;
|
||||
g.on_error([&status](std::string, std::string, unsigned http_status) {
|
||||
status = http_status;
|
||||
});
|
||||
|
||||
g.on_complete([&status](std::string /* body */, unsigned http_status){
|
||||
status = http_status;
|
||||
});
|
||||
|
||||
g.perform_sync();
|
||||
|
||||
REQUIRE(status == 200);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue