mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-04 22:31:02 +00:00
Covers src/slic3r/Utils, src/slic3r/plugin, src/slic3r/Config, src/libvgcode, src/dev-utils, src/OrcaSlicer.cpp and tests/, the directories left after src/slic3r/GUI and src/libslic3r. Generated with clang-tidy misc-include-cleaner. libvgcode's own headers are included by relative path as in the rest of that library, and Catch2 and pybind11 with angle brackets as elsewhere in the repo.
62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
#include <catch2/catch_all.hpp>
|
|
|
|
#include <catch2/catch_test_macros.hpp>
|
|
#include "slic3r/Utils/Http.hpp"
|
|
|
|
TEST_CASE("Check SSL certificates paths", "[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);
|
|
}
|
|
|
|
TEST_CASE("Http digest authentication", "[Http][NotWorking]") {
|
|
Slic3r::Http g = Slic3r::Http::get("https://httpbingo.org/digest-auth/auth/guest/guest");
|
|
|
|
g.auth_digest("guest", "guest");
|
|
|
|
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);
|
|
}
|
|
|
|
TEST_CASE("Http basic authentication", "[Http][NotWorking]") {
|
|
Slic3r::Http g = Slic3r::Http::get("https://httpbingo.org/basic-auth/guest/guest");
|
|
|
|
g.auth_basic("guest", "guest");
|
|
|
|
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);
|
|
}
|
|
|