# # # patch "tests/serve-automate/__driver__.lua" # from [9f91fdaf69c4dd84f49761a13312751c456bb38d] # to [e2d30039549bae2787c5791eb1fbbecdc7bc13e5] # # patch "unit-tests/netcmd.cc" # from [9c4a55299e107ce149928396aa6302edd258da1b] # to [c6c79bb5d3d732f97cc37e78250e12f9b25d9b81] # ============================================================ --- tests/serve-automate/__driver__.lua 9f91fdaf69c4dd84f49761a13312751c456bb38d +++ tests/serve-automate/__driver__.lua e2d30039549bae2787c5791eb1fbbecdc7bc13e5 @@ -10,7 +10,7 @@ check(mtn2("automate", "remote_stdio", s check(mtn2("automate", "remote_stdio", server.address), 0, true, false, "l17:interface_versione") -check(qgrep("^0:2:l:", "stdout")) +check(qgrep("^0:1:e:45:misuse: Sorry, you aren't allowed to do that.0:1:l:0:", "stdout")) server:stop() ============================================================ --- unit-tests/netcmd.cc 9c4a55299e107ce149928396aa6302edd258da1b +++ unit-tests/netcmd.cc c6c79bb5d3d732f97cc37e78250e12f9b25d9b81 @@ -340,19 +340,19 @@ UNIT_TEST(functions) int in_cmd_num(3), out_cmd_num; int in_err_code(9), out_err_code; - bool in_last(true), out_last; + char in_stream('k'), out_stream; string in_data("this is some packet data"), out_data; out_cmd.write_automate_packet_cmd(in_cmd_num, in_err_code, - in_last, in_data); + in_stream, in_data); string buf; do_netcmd_roundtrip(out_cmd, in_cmd, buf); in_cmd.read_automate_packet_cmd(out_cmd_num, out_err_code, - out_last, out_data); + out_stream, out_data); UNIT_TEST_CHECK(in_cmd_num == out_cmd_num); UNIT_TEST_CHECK(in_err_code == out_err_code); - UNIT_TEST_CHECK(in_last == out_last); + UNIT_TEST_CHECK(in_stream == out_stream); UNIT_TEST_CHECK(in_data == out_data); L(FL("automate_packet_cmd test done, buffer was %d bytes") % buf.size()); }