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::string body = aktualizrGet(config, server +
"/path/1/2/3");
16 EXPECT_EQ(
"{\"path\": \"/path/1/2/3\"}", body);
20 int main(
int argc,
char **argv) {
21 ::testing::InitGoogleTest(&argc, argv);
23 std::string port = TestUtils::getFreePort();
25 boost::process::child server_process(
"tests/fake_http_server/fake_test_server.py", port);
26 TestUtils::waitForServer(server +
"/");
27 return RUN_ALL_TESTS();
Configuration object for an aktualizr instance running on a Primary ECU.