Merge pull request #93419 from stigtsp/package/convos-4.23-fix-impure-test

convos: fix tests
This commit is contained in:
Daniël de Kok 2020-07-19 20:37:07 +02:00 committed by GitHub
commit 2981e5d268
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,16 +32,26 @@ perlPackages.buildPerlPackage rec {
patchShebangs script/convos
'';
# A test fails since gethostbyaddr(127.0.0.1) fails to resolve to localhost in
# the sandbox, we replace the this out from a substitution expression
#
# Module::Install is a runtime dependency not covered by the tests, so we add
# a test for it.
#
preCheck = ''
# A test fails since gethostbyaddr(127.0.0.1) fails to resolve to localhost in
# the sandbox, we replace the this out from a substitution expression
#
substituteInPlace t/web-register-open-to-public.t \
--replace '!127.0.0.1!' '!localhost!'
# Time-impurity in test, (fixed in master)
#
substituteInPlace t/web-load-user.t \
--replace '400' '410'
# Disk-space check fails on zfs, (fixed in master)
#
substituteInPlace t/web-admin.t \
--replace 'qr{/dev/}' 'qr{\w}'
# Module::Install is a runtime dependency not covered by the tests, so we add
# a test for it.
#
echo "use Test::More tests => 1;require_ok('Module::Install')" \
> t/00_nixpkgs_module_install.t
'';