diff --git a/cylc/rose/utilities.py b/cylc/rose/utilities.py index 1cf0dff..bad7eab 100644 --- a/cylc/rose/utilities.py +++ b/cylc/rose/utilities.py @@ -938,11 +938,7 @@ def record_cylc_install_options( rose_orig_host = get_host() for section in list(SECTIONS) + ['env']: if section in cli_config: - cli_config[section].set( - ['ROSE_ORIG_HOST'], - f'"{rose_orig_host}"' - if section in SECTIONS else rose_orig_host - ) + cli_config[section].set(['ROSE_ORIG_HOST'], rose_orig_host) cli_config[section]['ROSE_ORIG_HOST'].comments = [ ROSE_ORIG_HOST_INSTALLED_OVERRIDE_STRING ] diff --git a/tests/functional/test_post_install.py b/tests/functional/test_post_install.py index 1b980b9..a9ed528 100644 --- a/tests/functional/test_post_install.py +++ b/tests/functional/test_post_install.py @@ -112,7 +112,7 @@ def test_rose_fileinstall_uses_rose_template_vars(tmp_path): 'opts=\n[env]\nFOO=1' f'\n[template variables]\nX=Y\n' f'#{ROSE_ORIG_HOST_INSTALLED_OVERRIDE_STRING}\n' - f'ROSE_ORIG_HOST="{HOST}"\n' + f'ROSE_ORIG_HOST={HOST}\n' f'\n[env]\n' f'#{ROSE_ORIG_HOST_INSTALLED_OVERRIDE_STRING}\n' f'ROSE_ORIG_HOST={HOST}\n' @@ -139,8 +139,8 @@ def test_rose_fileinstall_uses_rose_template_vars(tmp_path): 'test/opt/rose-suite-bar.conf': '', 'test/opt/rose-suite-baz.conf': '', 'test/opt/rose-suite-cylc-install.conf': ( - '!opts=bar\n[env]\nBAR=1\nROSE_ORIG_HOST="abc123"\n' - '\n[template variables]\nROSE_ORIG_HOST="abc123"\n' + '!opts=bar\n[env]\nBAR=1\nROSE_ORIG_HOST=abc123\n' + '\n[template variables]\nROSE_ORIG_HOST=abc123\n' ), 'ref/opt/rose-suite-cylc-install.conf': f'!opts=bar baz\n[env]\nBAR=2\n' @@ -148,7 +148,7 @@ def test_rose_fileinstall_uses_rose_template_vars(tmp_path): f'ROSE_ORIG_HOST={HOST}\n' f'\n[template variables]\n' f'#{ROSE_ORIG_HOST_INSTALLED_OVERRIDE_STRING}\n' - f'ROSE_ORIG_HOST="{HOST}"\n', + f'ROSE_ORIG_HOST={HOST}\n', 'ref/rose-suite.conf': '!opts=foo bar baz (cylc-install)', 'ref/opt/rose-suite-foo.conf': '', 'ref/opt/rose-suite-bar.conf': '', @@ -177,7 +177,7 @@ def test_rose_fileinstall_uses_rose_template_vars(tmp_path): f'ROSE_ORIG_HOST={HOST}\n' f'\n[template variables]\n' f'#{ROSE_ORIG_HOST_INSTALLED_OVERRIDE_STRING}\n' - f'ROSE_ORIG_HOST="{HOST}"\n' + f'ROSE_ORIG_HOST={HOST}\n' ), 'ref/rose-suite.conf': '!opts=a b c (cylc-install)', 'ref/opt/rose-suite-a.conf': '', @@ -207,7 +207,7 @@ def test_rose_fileinstall_uses_rose_template_vars(tmp_path): f'ROSE_ORIG_HOST={HOST}\n' f'[jinja2:suite.rc]\na="b"\n' f'#{ROSE_ORIG_HOST_INSTALLED_OVERRIDE_STRING}\n' - f'ROSE_ORIG_HOST="{HOST}"\n' + f'ROSE_ORIG_HOST={HOST}\n' ), 'ref/rose-suite.conf': ( '!opts=foo bar (cylc-install)\n[jinja2:suite.rc]\ny="base"' diff --git a/tests/functional/test_reinstall.py b/tests/functional/test_reinstall.py index 9e4104d..9f06495 100644 --- a/tests/functional/test_reinstall.py +++ b/tests/functional/test_reinstall.py @@ -126,7 +126,7 @@ async def test_cylc_validate(fixture_provide_flow, cylc_validate_cli): '# This file records CLI Options.{version_info}\n' '!opts=b c\n' f'\n[env]\n#{ROHIOS}\nROSE_ORIG_HOST={HOST}\n' - f'\n[template variables]\n#{ROHIOS}\nROSE_ORIG_HOST="{HOST}"\n' + f'\n[template variables]\n#{ROHIOS}\nROSE_ORIG_HOST={HOST}\n' ) ) ] @@ -152,7 +152,7 @@ def test_cylc_install_files(fixture_install_flow, file_, expect, version_info): '# This file records CLI Options.{version_info}\n' '!opts=b c d\n' f'\n[env]\n#{ROHIOS}\nROSE_ORIG_HOST={HOST}\n' - f'\n[template variables]\n#{ROHIOS}\nROSE_ORIG_HOST="{HOST}"\n' + f'\n[template variables]\n#{ROHIOS}\nROSE_ORIG_HOST={HOST}\n' ) ) ] @@ -195,7 +195,7 @@ async def test_cylc_reinstall_files( '# This file records CLI Options.{version_info}\n' '!opts=b c d\n' f'\n[env]\n#{ROHIOS}\nROSE_ORIG_HOST={HOST}\n' - f'\n[template variables]\n#{ROHIOS}\nROSE_ORIG_HOST="{HOST}"\n' + f'\n[template variables]\n#{ROHIOS}\nROSE_ORIG_HOST={HOST}\n' ) ) ] diff --git a/tests/functional/test_reinstall_clean.py b/tests/functional/test_reinstall_clean.py index f05c0b7..1bde1ba 100644 --- a/tests/functional/test_reinstall_clean.py +++ b/tests/functional/test_reinstall_clean.py @@ -110,8 +110,7 @@ async def fixture_install_flow( '[env]\n' f'FOO=1\n#{ROHIOS}\n' f'ROSE_ORIG_HOST={HOST}\n' - f'\n[template variables]\n#{ROHIOS}' - f'\nROSE_ORIG_HOST="{HOST}"\n' + f'\n[template variables]\n#{ROHIOS}\nROSE_ORIG_HOST={HOST}\n' ) ), ] @@ -132,8 +131,7 @@ def test_cylc_install_files(fixture_install_flow, file_, expect, version_info): '[env]\n' f'BAR=2\n#{ROHIOS}\n' f'ROSE_ORIG_HOST={HOST}\n' - f'\n[template variables]\n#{ROHIOS}' - f'\nROSE_ORIG_HOST="{HOST}"\n' + f'\n[template variables]\n#{ROHIOS}\nROSE_ORIG_HOST={HOST}\n' ) ) ] diff --git a/tests/unit/test_fileinstall.py b/tests/unit/test_fileinstall.py index 4949a5e..62eee56 100644 --- a/tests/unit/test_fileinstall.py +++ b/tests/unit/test_fileinstall.py @@ -109,11 +109,11 @@ def test_rose_fileinstall_rose_suite_cylc_install_conf( "[env]\n" "FOO=42\n" f"#{ROSE_ORIG_HOST_INSTALLED_OVERRIDE_STRING}\n" - f'ROSE_ORIG_HOST={host}\n\n' + f"ROSE_ORIG_HOST={host}\n\n" "[jinja2:suite.rc]\n" "BAR=84\n" "CORNETTO=120\n" "FLAKE=99\n" f"#{ROSE_ORIG_HOST_INSTALLED_OVERRIDE_STRING}\n" - f'ROSE_ORIG_HOST="{host}"\n' + f"ROSE_ORIG_HOST={host}\n" )