i_assert(reply->status == 220);
break;
case 1: /* bad command reply */
- i_assert(reply->status == 501);
+ switch (client_index) {
+ case 0:
+ i_assert(reply->status == 501);
+ break;
+ case 1:
+ i_assert(reply->status == 250);
+ break;
+ default:
+ i_unreached();
+ }
if (debug)
i_debug("REPLIED");
ctx->replied = TRUE;
ctx->parser = smtp_reply_parser_init(conn->conn.input, SIZE_MAX);
conn->context = ctx;
- o_stream_nsend_str(conn->conn.output, "EHLO\r\n");
+ switch (client_index) {
+ case 0:
+ o_stream_nsend_str(conn->conn.output, "EHLO\r\n");
+ break;
+ case 1:
+ o_stream_nsend_str(conn->conn.output, "EHLO frop\r\n");
+ break;
+ default:
+ i_unreached();
+ }
}
static void test_bad_helo_client_deinit(struct client_connection *conn)
{
if (debug)
i_debug("Disconnect: %s", reason);
- io_loop_stop(ioloop);
}
static int
struct smtp_server_cmd_ctx *cmd ATTR_UNUSED,
struct smtp_server_cmd_helo *data ATTR_UNUSED)
{
- test_assert(FALSE);
return 1;
}
test_begin("bad HELO");
test_run_client_server(&smtp_server_set,
test_server_bad_helo,
- test_client_bad_helo, 1);
+ test_client_bad_helo, 2);
test_end();
}