1 #include <gtest/gtest.h>
3 #include <boost/process.hpp>
6 #include "test_utils.h"
8 static std::string server =
"http://localhost:";
10 TEST(aktualizr_get, good) {
13 config.storage.path = dir.Path();
15 std::vector<std::string> headers;
16 std::string body = aktualizrGet(config, server +
"/path/1/2/3", headers);
17 EXPECT_EQ(
"{\"path\": \"/path/1/2/3\"}", body);
21 int main(
int argc,
char **argv) {
22 ::testing::InitGoogleTest(&argc, argv);
24 std::string port = TestUtils::getFreePort();
26 boost::process::child server_process(
"tests/fake_http_server/fake_test_server.py", port);
27 TestUtils::waitForServer(server +
"/");
28 return RUN_ALL_TESTS();