From aa43ab8d77f118dfdc23a501d4ed2c73357e3976 Mon Sep 17 00:00:00 2001 From: Mark Smith Date: Sat, 1 Jun 2024 17:20:35 +0100 Subject: [PATCH 1/3] Update DiracBase.py --- ganga/GangaDirac/Lib/Backends/DiracBase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ganga/GangaDirac/Lib/Backends/DiracBase.py b/ganga/GangaDirac/Lib/Backends/DiracBase.py index 0b4e519bf3..9effdccf16 100644 --- a/ganga/GangaDirac/Lib/Backends/DiracBase.py +++ b/ganga/GangaDirac/Lib/Backends/DiracBase.py @@ -824,6 +824,7 @@ def clearFileInfo(f): outputfiles_foreach(j, DiracFile, lambda x: clearFileInfo(x)) @require_disk_space + @require_credential def getOutputData(self, outputDir=None, names=None, force=False, ignoreMissing=False): """Retrieve data stored on SE to dir (default=job output workspace). If names=None, then all outputdata is downloaded otherwise names should From 7b953338b5a4c8ec6ca6006a71262abe46d0ed03 Mon Sep 17 00:00:00 2001 From: Mark Smith Date: Mon, 3 Jun 2024 11:22:45 +0200 Subject: [PATCH 2/3] fix test --- ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py b/ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py index 7be3740015..32d9b160bf 100644 --- a/ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py +++ b/ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py @@ -351,6 +351,7 @@ def fake_outputfiles_foreach(job, file_type, func): def test_getOutputData(db, tmpdir): + mocker.patch('GangaCore.GPIDev.Credentials.credential_store') from GangaDirac.Lib.Files.DiracFile import DiracFile def fake_replicas(lfns): From bf95092c75be731330ea8008bfb2b51fa3a1e4c7 Mon Sep 17 00:00:00 2001 From: Mark Smith Date: Mon, 3 Jun 2024 12:34:52 +0200 Subject: [PATCH 3/3] fix test --- ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py b/ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py index 32d9b160bf..de4e358cde 100644 --- a/ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py +++ b/ganga/GangaDirac/test/Unit/Backends/TestDiracBase.py @@ -350,7 +350,7 @@ def fake_outputfiles_foreach(job, file_type, func): assert db.removeOutputData() is None -def test_getOutputData(db, tmpdir): +def test_getOutputData(db, tmpdir, mocker): mocker.patch('GangaCore.GPIDev.Credentials.credential_store') from GangaDirac.Lib.Files.DiracFile import DiracFile