21 Commits

Author SHA1 Message Date
Markus Mäkelä
47092ed18a
Prevent connection double counts in tests
The function would count a connection twice if hostname resolution was not
enabled and both the host and the IP matched.
2018-11-19 20:02:13 +02:00
Johan Wikman
6e4556849c Deal with columns being NULL
As it is not possible to create an std::string from NULL, we
need to handle each value separately.
2018-09-25 10:07:11 +03:00
Markus Mäkelä
71ffef5708
Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
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
Markus Mäkelä
a13e95951b
Merge branch '2.2' into develop 2018-08-30 11:37:49 +03:00
Timofey Turenko
4fd6d075cb doc and astyle fixes 2018-08-29 12:00:52 +03:00
Markus Mäkelä
b5584e3fd0
Backport test utility functions
The resultset processing functions are helpful in writing tests that
process resultsets.
2018-07-24 09:51:35 +03:00
Johan Wikman
7e9062f20f Merge branch '2.2' into develop 2018-05-16 09:31:13 +03:00
Markus Mäkelä
b776ed7821
Don't assume source and binary directories are the same
Some of the scripts assumed that other scripts would be located in the
same directory where the current script was executed.

Also fixed the SSL connection creation which depended on an obsolete
environment variable causing all out-of-source SSL tests to fail.
2018-05-15 10:14:38 +03:00
Markus Mäkelä
8b09ec56cf
Add resultset helper function to mariadb_func.h
Added a function that converts resultsets into matrices of strings.
2018-04-27 12:31:52 +03:00
Markus Mäkelä
f4bdf3012d
Merge branch '2.2' into develop 2018-04-23 14:20:32 +03:00
Markus Mäkelä
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
Markus Mäkelä
e3b11d866f
Use explicit types with get_row
Auto types aren't very neat as return values because they move the burden
of knowledge to the reader. Using an explicit, and somewhat
self-explanatory, type makes it easier to assess the code without knowing
the implementation of the type.
2018-04-13 08:48:21 +03:00
Markus Mäkelä
553e159182
MXS-1503: Test that no extra slaves are taken into use
Added a test that verifies that the slave connection count restrictions
work.
2018-04-12 10:42:39 +03:00
Markus Mäkelä
93f589ffa2
MXS-1506: Add test case
Added a test case that performs basic testing of the functionality.
2018-04-10 15:32:23 +03:00
Timofey Turenko
022c226d4b
Mxs 1665 keepalived masterdown test (#171)
* add keepalived_masterdown test

* add missing cnfs
2018-03-16 15:14:14 +02:00
Markus Mäkelä
dde85af83b Clean up mariadb_func.h
Combined functions into one which only used different default
values. Removed unused functions. Used std::string where possible to make
their usage easier. Hid code that isn't used externally.
2017-12-12 16:36:51 +02:00
Timofey Turenko
3c88bf1ec6
refactored tests (#147) 2017-12-08 12:23:04 +02:00
Markus Mäkelä
af08647fa2 Add variadic ssh function to mariadb_nodes
The ssh_node function now supports printf style arguments. This is used to
simplify command execution on the nodes.

Curreltny, in addition to its old usage, it is used to drop extra
databases when replication is started.
2017-10-01 10:49:11 +03:00
Markus Mäkelä
3584001281 Refactor and fix slave_failover
The test seems to fail when executed outside of a debugger. A delay
between creating the connections and checking the connection count appears
to fix the problem.

Refactored the test to use stack allocated objects and favored assertion
style functions over conditional clauses with failing assertions inside
them.
2017-06-05 13:20:16 +03:00
Markus Mäkelä
d7d4ec29bb Add tests from develop
Added tests from develop. The test results need to be modified for 2.0.
2017-05-26 15:40:40 +03:00