From a9e7d00177bc22e26a8f77577fdb4b4849d846de Mon Sep 17 00:00:00 2001 From: Jared Johnson Date: Thu, 11 Dec 2014 16:55:59 -0600 Subject: [PATCH] Tests exclude_connection() and exclude_recipient() --- t/plugin_tests/ident/p0f | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/plugin_tests/ident/p0f b/t/plugin_tests/ident/p0f index 1f7cb97..4f50a96 100644 --- a/t/plugin_tests/ident/p0f +++ b/t/plugin_tests/ident/p0f @@ -13,7 +13,6 @@ sub register_tests { $self->register_test('test_get_v3_query'); $self->register_test('test_store_v2_results'); $self->register_test('test_store_v3_results'); - $self->register_test('test_register_headers'); $self->register_test('test_register_genre_blocking'); $self->register_test('test_rcpt_handler'); @@ -119,9 +118,19 @@ sub test_check_genre { } sub test_exclude_connection { + my ( $self ) = @_; + $self->connection->relay_client(0); + ok( ! $self->exclude_connection, + 'default: exclude no connections from genre check' ); + $self->connection->notes( p0f_exclude => undef ); + $self->connection->relay_client(1); + ok( $self->exclude_connection, 'relay clients excluded from genre check' ); } sub test_exclude_recipient { + my ( $self ) = @_; + ok( ! $self->exclude_recipient({}), + 'default: exclude no recipients from genre check' ); } sub test_add_headers {