From 382ddf3ea10c26603c39e54b29ffa5332a9a7fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 25 Mar 2019 08:40:55 +0200 Subject: [PATCH] Update bug673 to expect new behavior Since whitespace in object names is now disallowed, the test must be adjusted accordingly. --- maxscale-system-test/bug673.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/maxscale-system-test/bug673.cpp b/maxscale-system-test/bug673.cpp index 9b9cad231..dd939d3ec 100644 --- a/maxscale-system-test/bug673.cpp +++ b/maxscale-system-test/bug673.cpp @@ -18,14 +18,12 @@ int main(int argc, char* argv[]) test.set_timeout(60); for (int i = 0; i < 2; i++) { - test.add_result(test.maxscales->ssh_node_f(0, - true, - "maxadmin show dbusers \"RW Split Router\"|grep 'User names'"), - "Old style objects in maxadmin commands should succeed"); - test.add_result(test.maxscales->ssh_node_f(0, - true, - "maxadmin show dbusers RW-Split-Router|grep 'User names'"), - "New style objects in maxadmin commands should succeed"); + constexpr const char* old_cmd = "maxadmin show dbusers \"RW Split Router\"|grep 'User names'"; + constexpr const char* new_cmd = "maxadmin show dbusers RW-Split-Router|grep 'User names'"; + test.expect(test.maxscales->ssh_node_f(0, true, old_cmd) != 0, + "Old style objects in maxadmin commands should fail"); + test.expect(test.maxscales->ssh_node_f(0, true, new_cmd) == 0, + "New style objects in maxadmin commands should succeed"); } return test.global_result;