Files
MaxScale/system-test/maxscale_process_user.cpp
Esa Korhonen 08f5174915 MXS-2900 Rename maxscale-system-test directory to system-test
A link with the old directory name is provided.
2020-07-28 15:24:27 +03:00

18 lines
473 B
C++

/**
* Check if Maxscale priocess is running as 'maxscale'
*/
#include "testconnections.h"
int main(int argc, char* argv[])
{
TestConnections test(argc, argv);
test.set_timeout(50);
auto res = test.maxscales->ssh_output("ps -U maxscale -C maxscale -o user --no-headers").second;
res = res.substr(0, strlen("maxscale"));
test.expect(res == "maxscale", "MaxScale running as '%s' instead of 'maxscale'", res.c_str());
return test.global_result;
}