Files
MaxScale/maxscale-system-test/show_monitor_crash.cpp
Niclas Antti c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00

34 lines
921 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->check_log_err(0, (char*) "Auth Error, Down", true);
Test->check_log_err(0, (char*) "fatal signal 11", false);
Test->check_maxscale_processes(0, 1);
int rval = Test->global_result;
delete Test;
return rval;
}