From: Timo Sirainen Date: Sun, 12 Apr 2020 08:34:14 +0000 (+0300) Subject: lib-imap-client: test-imapc-client - Client now sends LOGOUT and server expects it X-Git-Tag: 2.3.13~580 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c91b90cccd895e14d2d7921051b14cb61f62dc64;p=thirdparty%2Fdovecot%2Fcore.git lib-imap-client: test-imapc-client - Client now sends LOGOUT and server expects it --- diff --git a/src/lib-imap-client/test-imapc-client.c b/src/lib-imap-client/test-imapc-client.c index f745a56b5f..b905916334 100644 --- a/src/lib-imap-client/test-imapc-client.c +++ b/src/lib-imap-client/test-imapc-client.c @@ -158,6 +158,7 @@ static void test_run_client_server( ioloop = io_loop_create(); imapc_client = imapc_client_init(&client_set_copy); client_test(); + imapc_client_logout(imapc_client); test_assert(array_count(&imapc_cmd_last_replies) == 0); if (imapc_client != NULL) imapc_client_deinit(&imapc_client); @@ -386,6 +387,9 @@ static void test_imapc_reconnect_server(void) test_assert(test_imapc_server_expect("3 NOOP")); o_stream_nsend_str(server.output, "3 OK \r\n"); + test_assert(test_imapc_server_expect("5 LOGOUT")); + o_stream_nsend_str(server.output, "5 OK \r\n"); + test_assert(i_stream_read_next_line(server.input) == NULL); } @@ -450,6 +454,9 @@ static void test_imapc_reconnect_resend_cmds_server(void) test_assert(test_imapc_server_expect("3 RETRY2")); o_stream_nsend_str(server.output, "3 OK \r\n"); + test_assert(test_imapc_server_expect("6 LOGOUT")); + o_stream_nsend_str(server.output, "6 OK \r\n"); + test_assert(i_stream_read_next_line(server.input) == NULL); } @@ -581,6 +588,9 @@ static void test_imapc_reconnect_mailbox_server(void) test_assert(test_imapc_server_expect("3 RETRY")); o_stream_nsend_str(server.output, "3 OK \r\n"); + test_assert(test_imapc_server_expect("7 LOGOUT")); + o_stream_nsend_str(server.output, "7 OK \r\n"); + test_assert(i_stream_read_next_line(server.input) == NULL); }