Skip to content

Commit

Permalink
sweep: DIRACGrid#7668 fix: CVMFS_locations might be an empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni authored and web-flow committed Jun 11, 2024
1 parent f2b341e commit d0c9b87
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def pilotWrapperScript(
if envVariables is None:
envVariables = {}

if CVMFS_locations is None:
if not CVMFS_locations:
# What is in this location is almost certainly incorrect, especially the pilot.json
CVMFS_locs = '["file:/cvmfs/dirac.egi.eu/pilot"]'
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,18 @@ def test_scriptPilot3_3():
"""locations += ["file:/cvmfs/lhcb.cern.ch/lhcbdirac/pilot","file:/cvmfs/dirac.egi.eu/lhcbdirac/pilot"]"""
in res
)


def test_scriptPilot3_4():
"""test script creation"""
res = pilotWrapperScript(
pilotFilesCompressedEncodedDict={"proxy": "thisIsSomeProxy"},
pilotOptions="-c 123 --foo bar -l LHCb -h pippo",
envVariables={"someName": "someValue", "someMore": "oneMore"},
location="lhcb-portal.cern.ch",
CVMFS_locations=[],
)

assert 'os.environ["someName"]="someValue"' in res
assert "lhcb-portal.cern.ch" in res
assert """locations += ["file:/cvmfs/dirac.egi.eu/pilot"]""" in res

0 comments on commit d0c9b87

Please sign in to comment.