diff --git a/Dockerfile b/Dockerfile index 25c4a31..d7a4cd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,3 +51,6 @@ ENV PERL5LIB /opt/Bio-ENA-DataSubmission/lib:$PERL5LIB ENV ENA_SUBMISSIONS_DATA /opt/Bio-ENA-DataSubmission/data RUN cd /opt/Bio-ENA-DataSubmission && dzil authordeps --missing | cpanm --notest RUN cd /opt/Bio-ENA-DataSubmission && dzil listdeps --missing | grep -v 'VRTrack::Lane' | cpanm --notest + +RUN cd /opt/Bio-ENA-DataSubmission && \ + dzil test diff --git a/install-travis-dependencies.sh b/install-travis-dependencies.sh index b7d4eaa..85b839c 100644 --- a/install-travis-dependencies.sh +++ b/install-travis-dependencies.sh @@ -30,5 +30,7 @@ cd $start_dir dzil authordeps --missing | cpanm --notest dzil listdeps --missing | grep -v 'VRTrack::Lane' | cpanm --notest +dzil test + set +eu set +x diff --git a/t/Bio/ENA/DataSubmission/WEBINCli.t b/t/Bio/ENA/DataSubmission/WEBINCli.t index 4d329e2..18489da 100644 --- a/t/Bio/ENA/DataSubmission/WEBINCli.t +++ b/t/Bio/ENA/DataSubmission/WEBINCli.t @@ -188,11 +188,15 @@ sub test_directory_not_a_directory { # Check manifest validation when file is not readable { - my $args = { %full_args }; - $args->{'manifest'} = $unreadable_manifest; - my $under_test = Bio::ENA::DataSubmission::WEBINCli->new(%$args); - throws_ok {$under_test->run()} 'Bio::ENA::DataSubmission::Exception::CannotReadFile', "dies if manifest is not a readable file"; - + SKIP: { + skip "running as root, so disabled the test \"Check manifest validation when file is not readable\"", 1 + if ('root' eq scalar(getpwuid $>)); + + my $args = { %full_args }; + $args->{'manifest'} = $unreadable_manifest; + my $under_test = Bio::ENA::DataSubmission::WEBINCli->new(%$args); + throws_ok {$under_test->run()} 'Bio::ENA::DataSubmission::Exception::CannotReadFile', "dies if manifest is not a readable file"; + } } remove_tree($temp_input_dir_name, $temp_output_dir_name, $filename, $manifest_filename, $temp_dir_name, $unreadable_manifest);