MaxScale/maxscale-system-test/show_monitor_crash.cpp
Markus Mäkelä 4b6aab1417
Replace check_log_err with log_includes/log_excludes
The latter are more explicit and easier to understand at the call site.

Also removed the redundant crash checks via the log files.
2018-11-19 20:02:11 +02:00

33 lines
845 B
C++

/**
* @file show_monitor_crash.cpp show_monitor_crash regression case for crash if maxadmin 'show monitors'
* command is issued, but no monitor is not running
*
* - maxscale.cnf contains wrong monitor config (user name is wrong)
* - issue 'show monitors' maxadmin command
* - check for crash
*/
#include <iostream>
#include <unistd.h>
#include "testconnections.h"
using namespace std;
int main(int argc, char* argv[])
{
TestConnections* Test = new TestConnections(argc, argv);
Test->set_timeout(100);
Test->maxscales->execute_maxadmin_command(0, (char*) "show monitors");
sleep(5);
// Servers should get the Auth Error state when credentials are bad
Test->log_includes(0, "Auth Error, Down");
Test->check_maxscale_processes(0, 1);
int rval = Test->global_result;
delete Test;
return rval;
}