Commit Graph

96 Commits

Author SHA1 Message Date
a0d12191da Create test database when processing config template
For an unknown reason, the mxs874_slave_recovery test times out unless the
test database is created when the config templates are being processed.
2018-10-08 09:53:30 +03:00
fed5037081 Make copying of SSL certs conditional
If the certs exist, they are not copied. This makes testing slightly
faster.
2018-10-05 11:25:50 +03:00
8029bdff4f Process maxscale.cnf template with one sed command
Using a single sed command with multiple -e flags is faster than multiple
separate sed commands.
2018-10-05 11:25:49 +03:00
75ea1b6ea1 Fix formatting of new(std::nothrow)
The code previously formatted everything as `new( std::nothrow)`.
2018-10-04 21:50:44 +03:00
9ecd027ea0 Test: Provide additional control of local MaxScale
When running BLR locally, you need to be able to specify what
IP the BLR is visible at (127.0.0.1 does not work for VM nodes)
and also to perform cleanup etc. action when needed.
2018-10-04 12:57:54 +03:00
dfc10b109d MXS-1937 Add failover/switchover with server events test
The test adds a scheduled server event, the does failover, rejoin and
switchover and checks that event is manipulated correctly. Also includes
a change to the monitor to fix an invalid ALTER EVENT query when the event
definer has wildcard host.
2018-09-24 10:43:17 +03:00
71ffef5708 Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
7ec2f77708 Merge branch '2.2' into develop 2018-09-12 23:18:08 +03:00
f6840fbded Remove implicit initialization of all maxscales
The extra maxscale instances are only started if the test explicitly
requests it.
2018-09-12 22:09:38 +03:00
d881630204 Allow programatic control of galera restarting
If a test program needs other than the default Galera config
(e.g. log_slave_updates enabled), then it should be able to
programmatically cause galera to be restarted as part of the
TestConnections construction.
2018-09-12 09:09:52 +03:00
d11c78ad80 Format all sources with Uncrustify
Formatted all sources and manually tuned some files to make the code look
neater.
2018-09-10 13:22:49 +03:00
edd5ddcc88 Merge branch '2.2' into develop 2018-09-10 12:29:00 +03:00
6279ab350c Rename TestConnections::assert() to TestConnections::expect()
Allows the including of <assert.h>.
2018-09-10 10:24:46 +03:00
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
a13e95951b Merge branch '2.2' into develop 2018-08-30 11:37:49 +03:00
4fd6d075cb doc and astyle fixes 2018-08-29 12:00:52 +03:00
bb1efd1b34 Merge branch '2.2' into develop 2018-08-07 22:20:27 +03:00
7394f03cd9 Exit with failure if coredump is found in destructor
If the test would otherwise succeed but a coredump is found when the logs
are copied in the destructor, the test would pass. To prevent this, the
destructor should always exit with a non-zero status when it detects an
error.
2018-08-07 22:14:33 +03:00
37f32464f2 Rewrite mxs564_big_dump
Streamlined the test to perform as much testing as fast as possible. The
gradual ramp up did not provide any concrete benefits compared to testing
everything at once.

Replaced structures with C++11 alternatives where possible and removed
unused, redundant or dead code.
2018-07-24 09:51:47 +03:00
bfd3d2975d Merge branch '2.2' into develop 2018-07-06 14:56:19 +03:00
cb05199bac Stop MaxScale before fixing replication
Before the state of the backend servers is checked, MaxScale needs to be
stopped to prevent the automated failover from interfering in the start-up
process.
2018-07-05 21:03:57 +03:00
2e88ce4132 Merge branch '2.2' into develop 2018-07-04 22:01:01 +03:00
d98ffb5d0a Always stop MaxScale before test
The test should stop MaxScale at the start unless the manual debug flag is
given on the command line. This fixes the connection failure of mxs1719
but reveals a problem with the filter itself.
2018-07-04 13:51:10 +03:00
b98c0841b4 Enable and fix -Wextra warnings
Fixed all warnings that were present with -Wextra.
2018-07-03 15:07:19 +03:00
ccdbfa8997 Fix test compilation failures
The tests failed to compile due to invalid use of try_query. For some
reason this wasn't detected by newer compilers.

Also fixed the compilation failure of mxs1713_lots_of_database on CentOS
7.
2018-07-02 12:45:57 +03:00
3d8f946e19 Take dump_stacktrace into use
MaxScale and tests now both use the same code to dump stacktraces.
2018-06-22 13:59:57 +03:00
6278f27ab6 Merge branch '2.2' into develop 2018-06-20 10:26:29 +03:00
8f71e803c1 Copy test logs in parallel
The log copying is now done in parallel for all VMs.
2018-06-20 08:40:17 +03:00
24bb8b0b2c Clean up mxs548_short_session_change_user
The test unnecessarily did an unconditional drop of the user resulting in
errors. Also prevented stopping of MaxScale if it wasn't started in the
first place.
2018-06-18 11:32:28 +03:00
ba0e3bd6b7 Speed up avrorouter testing
Cut test time from about 300 seconds to 200 seconds.
2018-06-08 12:18:14 +03:00
74cc74ed66 Remove MySQL 5.1 support from tests
Removed the configuration parameter template and the code that uses it.
2018-06-04 19:26:36 +03:00
5d02d8c0ba Merge branch '2.2' into develop 2018-06-01 09:33:04 +03:00
8917458505 MXS-1890 Make it easier to run tests using local MaxScale
Now, if a test is invoked with '-l', then MaxScale is assumed to
be running locally using a configuration file suitable for the
test that is invoked. Further, at the end of the test, the log
files of MaxScale are not downloaded (obviously).

As a side-effect, an environment variable no_maxscale_log_copy,
similar to the existing no_backend_log_copy, has been introduced
using which the downloading of maxscale log files unconditionally
can be prevented.
2018-05-30 21:05:10 +03:00
f62d155036 MXS-173 Test for throttling filter
The test may fail if the client/maxscale/mariadb combo is too slow.
TODO, maybe: today I saw mysql_query() hang (in a poll) when maxscale
disconnected. Is there something that can be done about that?
I added a source directory, base, for stuff that should become part of a common
utility library in the future.
2018-05-25 14:51:36 +03:00
cd303df35c Revert "Trunate logs instead of removing"
This reverts commit 14dc215a787e64fb6457889b647c861f634d68a5.
2018-05-25 12:12:35 +03:00
14dc215a78 Trunate logs instead of removing
By truncating the files, tests can be run while the log is being
tailed. If they are removed, the files need to be reopened each time a
test is started.
2018-05-22 15:44:55 +03:00
bf933ecc22 Open all ports by default
The test now flushes the INPUT chain of iptables at the start of the
test. This should open all ports even if the OS by default defines some
rules that block ports.
2018-05-17 10:04:00 +03:00
ed2d0f4a5b Allow out-of-source test runs
The test can now be run outside of the test source directory. Since the
`test_dir` global variable contains the absolute path to the test source,
all copying of configurations and execution of scripts can be done with
minimal changes.
2018-05-15 10:14:38 +03:00
421e64ceeb Take -Wall into use for tests
Take almost all warnings into use except `format-overflow` and
`unused-function`. format-overflow needs to be handled in a separate
commit.
2018-04-23 14:02:54 +03:00
0f0913fc99 Fix test build failures with GCC 8
GCC 8 enables -Werror=return-type by default which combined with -Werror
causes the build to fail.
2018-04-23 14:02:53 +03:00
01b04094a6 Only check for cores at root level
The previous core check would pick up any file in /tmp/ that would start
with the `core` prefix. This included some npm generated files which are
created if MaxCtrl is built on the MaxScale machine.
2018-03-29 14:25:19 +03:00
eca77fb4c9 Improve core dump detection
The core dump detection now properly distinguishes core dumps and ssh
failures.
2018-03-28 16:50:27 +03:00
e921298af9 add Maxscale stop into test init procedure 2018-03-27 12:58:05 +03:00
8b943e249b MXS-1731: Treat empty parameters as errors
If a parameter is defined without a value, it is now treated as an error.
2018-03-21 14:14:13 +02:00
94f29a11c5 MXS-1724: Reimplement core dump detection
Reimplemented the core dump detection for 2.2.
2018-03-20 13:06:20 +02:00
022c226d4b Mxs 1665 keepalived masterdown test (#171)
* add keepalived_masterdown test

* add missing cnfs
2018-03-16 15:14:14 +02:00
5941f9d3b3 Silence debugging commands
If verbose mode is not enabled, the exact commands don't need to be
printed.
2018-02-14 14:47:03 +02:00
f7857518f3 Mxs 1140 keepalived (#166)
add keepalived test
2018-02-12 15:49:07 +02:00
6a1aba70e7 Add test case for ignore_external_masters + failover
The test checks that failover works even when the master of the monitored
cluster is a slave to an external masters. The test also verifies that the
servers do not get unexpected status labels.
2018-02-07 16:07:16 +02:00
6132ebd24f MXS-1643: Add test case
Added test case that checks that the correct state changes are made and no
extra events are triggered.

Also cleaned up the log checking function.
2018-02-06 14:51:07 +02:00