theqvd / theqvd

QVD is an Open Source VDI (Virtual Desktop Infrastructure) solution, developed by Qindel Group, it provides a safe and easy to manage alternative to desktops and applications virtualisation under Linux environment.
http://theqvd.com
105 stars 31 forks source link

QVD-DB: Configuration entry for database.password missing #45

Closed HenrikBach1 closed 7 years ago

HenrikBach1 commented 7 years ago

Hi,

Why is a database.password missing for a test case? What can/should I do?:

"---------------------- make[1]: Entering directory 'theqvd-master/ext/QVD-DB' PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/.t t/00-load.t ....... 1/1

Failed test 'use QVD::DB;'

at t/00-load.t line 6.

Tried to use 'QVD::DB'.

Error: Configuration entry for database.password missing

Compilation failed in require at t/00-load.t line 6.

BEGIN failed--compilation aborted at t/00-load.t line 6.

Testing QVD::DB 0.01, Perl 5.022001, /usr/bin/perl

Looks like you failed 1 test of 1.

t/00-load.t ....... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests t/boilerplate.t ... ok
t/pod-coverage.t .. skipped: Test::Pod::Coverage 1.08 required for testing POD coverage t/pod.t ........... skipped: Test::Pod 1.22 required for testing POD

Test Summary Report

t/00-load.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 t/boilerplate.t (Wstat: 0 Tests: 3 Failed: 0) TODO passed: 1, 3 Files=4, Tests=4, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.33 cusr 0.02 csys = 0.37 CPU) Result: FAIL Failed 1/4 test programs. 1/4 subtests failed. Makefile:947: recipe for target 'test_dynamic' failed make[1]: *** [test_dynamic] Error 255 make[1]: Leaving directory 'theqvd-master/ext/QVD-DB' ----------------------"

/Henrik

vatral commented 7 years ago

Hello,

QVD::DB is a database handling module. It uses QVD::Config::Core to retrieve settings, such as the database connection data. One of those is 'database.password'. If a setting is mandatory and not set, then the code aborts when it tries to read it, which is what is happening here.

You can fix this error by creating /etc/qvd/node.conf with this content:

database.password = test

This will make it happy and pass the test. Since currently there are no actual tests for QVD::DB besides the one that tries to simply load the module, you don't even need a database of any kind.

I will take note of this and look at getting it fixed, but it's perfectly safe to ignore this error.