From 6eea46a882707869dbb77f0253665cb96d650794 Mon Sep 17 00:00:00 2001 From: voetberg Date: Fri, 8 Mar 2024 15:17:42 -0600 Subject: [PATCH] Tests: Change download target for test_download_pfn, added custom error message #6506 --- tests/test_bin_rucio.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_bin_rucio.py b/tests/test_bin_rucio.py index 663ba912ca..10c02b1dbf 100755 --- a/tests/test_bin_rucio.py +++ b/tests/test_bin_rucio.py @@ -685,11 +685,15 @@ def test_download_pfn(self): print(out, err) # download files + download_dir = "/temp" replica_pfn = list(self.replica_client.list_replicas([{'scope': self.user, 'name': name}]))[0]['rses'][self.def_rse][0] - cmd = 'rucio -v download --rse {0} --pfn {1} {2}:{3}'.format(self.def_rse, replica_pfn, self.user, name) + cmd = f'rucio -v download --dir {download_dir} --rse {self.def_rse} --pfn {replica_pfn} {self.user}:{name}' exitcode, out, err = execute(cmd) - print(out, err) - assert re.search('Total files.*1', out) is not None + + if "Access to local destination denied." in err: # Known issue - see #6506 + assert False, "test `test_download_pfn` unable to access file {self.user}/{name} in {download_dir}" + else: + assert re.search('Total files.*1', out) is not None try: for i in listdir('data13_hip'):