Rename TestConnections::assert() to TestConnections::expect()

Allows the including of <assert.h>.
This commit is contained in:
Johan Wikman
2018-09-10 10:24:46 +03:00
parent bcacdf9358
commit 6279ab350c
38 changed files with 117 additions and 117 deletions

View File

@ -9,22 +9,22 @@ int main(int argc, char** argv)
TestConnections test(argc, argv);
int rc = test.maxscales->ssh_node_f(0, false, "maxctrl help list servers");
test.assert(rc == 0, "`help list servers` should work");
test.expect(rc == 0, "`help list servers` should work");
rc = test.maxscales->ssh_node_f(0, false, "maxctrl --tsv list servers|grep 'Master, Running'");
test.assert(rc == 0, "`list servers` should return at least one row with: Master, Running");
test.expect(rc == 0, "`list servers` should return at least one row with: Master, Running");
rc = test.maxscales->ssh_node_f(0, false, "maxctrl set server server1 maintenance");
test.assert(rc == 0, "`set server` should work");
test.expect(rc == 0, "`set server` should work");
rc = test.maxscales->ssh_node_f(0, false, "maxctrl --tsv list servers|grep 'Maintenance'");
test.assert(rc == 0, "`list servers` should return at least one row with: Maintanance");
test.expect(rc == 0, "`list servers` should return at least one row with: Maintanance");
rc = test.maxscales->ssh_node_f(0, false, "maxctrl clear server server1 maintenance");
test.assert(rc == 0, "`clear server` should work");
test.expect(rc == 0, "`clear server` should work");
rc = test.maxscales->ssh_node_f(0, false, "maxctrl --tsv list servers|grep 'Maintenance'");
test.assert(rc != 0, "`list servers` should have no rows with: Maintanance");
test.expect(rc != 0, "`list servers` should have no rows with: Maintanance");
test.check_maxscale_alive();
return test.global_result;