Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit Test Failure in t/04-extra-opts.t #27

Open
bgeels opened this issue Mar 9, 2021 · 4 comments
Open

Unit Test Failure in t/04-extra-opts.t #27

bgeels opened this issue Mar 9, 2021 · 4 comments

Comments

@bgeels
Copy link

bgeels commented Mar 9, 2021

Hi,

I'm attempting to build this module and am hitting an error in the t/04-extra-opts.t test. As far as I can tell, it's failing because it can not open a file, t/etc/mysql-dbs.ini, due to this line:

https://github.com/lausser/GLPlugin/blob/master/t/04-extra-opts.t#L17

Any help you could provide resolving this issue would be appreciated, full output of make test included below.

Operating System:

CentOS Linux release 7.6.1810 (Core) 

Perl Version:

This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi

Make Test Output

$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ......... 1/? # Testing Monitoring::GLPlugin 3.3.3.3, Perl 5.016003, /usr/bin/perl
t/00-load.t ......... ok   
t/01-new.t .......... 1/4 # 01-new.t
# /tmp
# /tmp/device::uptime
# 01-new.t
# undef
Use of uninitialized value in sprintf at /tmp/GLPlugin/blib/lib/Monitoring/GLPlugin.pm line 1412.
# /device::uptime
t/01-new.t .......... ok   
t/02-valdiff.t ...... 1/54 # statefile is /tmp/device::uptime_test
# now test ever growing metrics. shrinking means overrun
# now test growing and shrinking metrics
t/02-valdiff.t ...... 8/54 # delta -5
# now test growing and shrinking metrics, compare to a value in the past
t/02-valdiff.t ...... 11/54 # suddenly count is only 5
# delta -5 must be the result for the next 10 seconds
t/02-valdiff.t ...... 14/54 # after 12s delta is 0
# now test growing and shrinking metrics
# now test growing and shrinking lists
t/02-valdiff.t ...... 19/54 # delta -2
t/02-valdiff.t ...... 26/54 # delta 0
# now test growing and shrinking metrics, compare to a value in the past
# now test growing and shrinking lists, compare to a list in the past
t/02-valdiff.t ...... 43/54 # state change, ELEM4 and ELEM5 lost
t/02-valdiff.t ...... 46/54 # should still be the same
t/02-valdiff.t ...... 52/54 # after 12s delta is 0
t/02-valdiff.t ...... ok     
t/03-environment.t .. Use of uninitialized value $ENV{"TZ"} in concatenation (.) or string at t/03-environment.t line 18.
t/03-environment.t .. ok   
t/04-extra-opts.t ... 1/1 # Looks like your test exited with 3 just after 1.
t/04-extra-opts.t ... Dubious, test returned 3 (wstat 768, 0x300)
All 1 subtests passed 
t/10-snmp.t ......... Name "Monitoring::GLPlugin::pluginname" used only once: possible typo at t/10-snmp.t line 55.
t/10-snmp.t ......... 1/4 # 10-snmp.t
# /tmp
# /tmp/device::uptime
t/10-snmp.t ......... ok   
t/manifest.t ........ skipped: Author tests not required for installation
t/pod-coverage.t .... skipped: Author tests not required for installation
t/pod.t ............. skipped: Author tests not required for installation

Test Summary Report
-------------------
t/04-extra-opts.t (Wstat: 768 Tests: 1 Failed: 0)
  Non-zero exit status: 3
Files=9, Tests=70, 42 wallclock secs ( 0.05 usr  0.02 sys +  0.90 cusr  0.20 csys =  1.17 CPU)
Result: FAIL
Failed 1/9 test programs. 0/70 subtests failed.
make: *** [test_dynamic] Error 255
@bgeels
Copy link
Author

bgeels commented Mar 9, 2021

After digging a little bit more it looks like the intention of this test was to override some cli options by specifying an .ini file. Creating a file like what's shown below in addition to modifying the test plan of the test to be plan tests => 7; allows the test to pass.

$ cat t/etc/mysql-dbs.ini 
method=mysql
hostname=wwwsrv8.naprax.de
password=pfu1de1fl
statefilesdir=/var/tmp/testtest
name=saxndi

I can add that if its omission was an oversight. Otherwise, if I'm overlooking a build step please let me know.

Thanks!

@lausser
Copy link
Owner

lausser commented Mar 9, 2021 via email

@lausser
Copy link
Owner

lausser commented Mar 9, 2021 via email

@bgeels
Copy link
Author

bgeels commented Mar 9, 2021

Ha gotcha, thanks for quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants