mirror of
https://github.com/springzfx/cgproxy.git
synced 2026-02-09 21:14:57 +08:00
merge to one executable
This commit is contained in:
@@ -2,6 +2,6 @@ include_directories(${PROJECT_SOURCE_DIR})
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src)
|
||||
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
add_executable(client_test socket_client_test.cpp)
|
||||
target_link_libraries(client_test cgproxy-lib)
|
||||
add_executable(client_test socket_client_test.cpp
|
||||
../src/socket_client.cpp ../src/common.cpp ../src/config.cpp)
|
||||
target_link_libraries(client_test nlohmann_json::nlohmann_json)
|
||||
@@ -29,16 +29,15 @@ void send_pid(const pid_t pid, bool proxy, int &status) {
|
||||
SOCKET::send(j.dump(), status);
|
||||
}
|
||||
|
||||
|
||||
void test_config(){
|
||||
void test_config() {
|
||||
Config config;
|
||||
config.cgroup_proxy={"/"};
|
||||
config.cgroup_proxy = {"/"};
|
||||
int status;
|
||||
send_config(config, status);
|
||||
}
|
||||
|
||||
void test_config_path(){
|
||||
string path="/etc/cgproxy/config.json";
|
||||
void test_config_path() {
|
||||
string path = "/etc/cgproxy/config.json";
|
||||
int status;
|
||||
send_config_path(path, status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user