Bug 7979 - tests fail if Mail::DMARC is not installed
Summary: tests fail if Mail::DMARC is not installed
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: PC Linux
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-25 05:31 UTC by Noah Meyerhans
Modified: 2022-04-25 05:41 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Noah Meyerhans 2022-04-25 05:31:26 UTC
Mail::DMARC is used by Mail::SpamAssassin::Plugin::DMARC, which is documented as optional and disabled by default. However, tests fail if it isn't installed:

noahm@96ea34a3e08c:/src/trunk$ perl -T ./t/all_modules.t 
1..7
        /usr/bin/perl -T -w ../spamassassin.raw -C log/all_modules.mN9UBK/localrules  --siteconfigpath log/all_modules.mN9UBK/siterules -p log/all_modules.mN9UBK/user.cf  -D -L -t < data/nice/001 2>&1 | grep -vE '(ResourceLimits not used)'
        Checking ok
ok 1
        Checking for anti-pattern tainted at ./t/all_modules.t line 95.
ok 2
        Checking for anti-pattern parse at ./t/all_modules.t line 95.
ok 3
        Checking for anti-pattern syntax at ./t/all_modules.t line 95.
ok 4
        Checking for anti-pattern uninitialized at ./t/all_modules.t line 95.
ok 5
        Checking for anti-pattern warn at ./t/all_modules.t line 95.
        Found anti-pattern: warn =  warn:  at ./t/all_modules.t line 95.
not ok 6
#   Failed test at t/SATest.pm line 875.
        Checking for anti-pattern at_line at ./t/all_modules.t line 95.
ok 7
Output can be examined in: log/all_modules.mN9UBK/d.all_modules/0
# Looks like you failed 1 test of 7.

noahm@96ea34a3e08c:/src/trunk$ grep warn ./t/log/all_modules.mN9UBK/d.all_modules/0
Apr 25 05:27:33.422 [8] warn: DMARC not supported, required module Mail::DMARC missing


If I install Mail::DMARC, this test passes.
Comment 1 Henrik Krohns 2022-04-25 05:41:30 UTC
Should pass now

Sending        trunk/all_modules.t
Transmitting file data .done
Committing transaction...
Committed revision 1900249.