From aefd27a7f8cdbdbb5670a21fa5969e5012d22786 Mon Sep 17 00:00:00 2001 From: Marco Mosca Date: Thu, 21 Nov 2024 12:50:16 +0000 Subject: [PATCH 1/3] Add undef tracking schema to inferred ID Run test in log_publisher --- t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm b/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm index 06e8e321..18602d14 100644 --- a/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm +++ b/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm @@ -64,9 +64,10 @@ sub publish_logs : Test(12) { my $runfolder_path2 = "t/data/illumina/sequence/150910_HS40_17550_A_C75BCANXX"; my $pub2 = WTSI::NPG::HTS::Illumina::LogPublisher->new - (irods => $irods, - runfolder_path => $runfolder_path2, - dest_collection => "$irods_tmp_coll/publish_logs_inferred_id_run"); + (irods => $irods, + runfolder_path => $runfolder_path2, + npg_tracking_schema => undef, + dest_collection => "$irods_tmp_coll/publish_logs_inferred_id_run"); my $log_archive2 = $pub2->publish_logs; ok($log_archive2, 'Log archive created given a runfolder path'); From a4a87a33dc29318e11935f22721c4120fd6c7a95 Mon Sep 17 00:00:00 2001 From: Marco Mosca Date: Thu, 21 Nov 2024 13:58:41 +0000 Subject: [PATCH 2/3] Fix indentation --- t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm b/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm index 18602d14..85e34a85 100644 --- a/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm +++ b/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm @@ -64,10 +64,10 @@ sub publish_logs : Test(12) { my $runfolder_path2 = "t/data/illumina/sequence/150910_HS40_17550_A_C75BCANXX"; my $pub2 = WTSI::NPG::HTS::Illumina::LogPublisher->new - (irods => $irods, - runfolder_path => $runfolder_path2, - npg_tracking_schema => undef, - dest_collection => "$irods_tmp_coll/publish_logs_inferred_id_run"); + (irods => $irods, + runfolder_path => $runfolder_path2, + npg_tracking_schema => undef, + dest_collection => "$irods_tmp_coll/publish_logs_inferred_id_run"); my $log_archive2 = $pub2->publish_logs; ok($log_archive2, 'Log archive created given a runfolder path'); From 07b306c1a62537527a5b4dddd785b39cf1faf7e4 Mon Sep 17 00:00:00 2001 From: Marco Mosca Date: Fri, 22 Nov 2024 12:21:25 +0000 Subject: [PATCH 3/3] Add comments about test fix --- t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm b/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm index 85e34a85..58b9377c 100644 --- a/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm +++ b/t/lib/WTSI/NPG/HTS/Illumina/LogPublisherTest.pm @@ -63,6 +63,11 @@ sub publish_logs : Test(12) { # test the RunPublisher my $runfolder_path2 = "t/data/illumina/sequence/150910_HS40_17550_A_C75BCANXX"; + + # The tracking database handle must be specified, otherwise when + # the tracking schema file exists in .npg folder it tries to retrieve + # the db credentials from it and connect to the database defined there. + # By setting it to 'undef', the code avoids the database route. my $pub2 = WTSI::NPG::HTS::Illumina::LogPublisher->new (irods => $irods, runfolder_path => $runfolder_path2,