Skip to content

Commit

Permalink
Merge pull request #7669 from DIRACGridBot/cherry-pick-2-cfb22edde-in…
Browse files Browse the repository at this point in the history
…tegration

[sweep:integration] fix: CVMFS_locations might be an empty list
  • Loading branch information
fstagni committed Jun 12, 2024
2 parents f2b341e + d0c9b87 commit 90b8855
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 90b8855

Please sign in to comment.