Skip to content

Commit

Permalink
Fix lint and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottWales committed Dec 3, 2024
1 parent 2ae8bb3 commit 9b7c1e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
4 changes: 2 additions & 2 deletions cylc/flow/network/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -1887,8 +1887,8 @@ class Arguments:
workflows = graphene.List(WorkflowID, required=True)

reload_global = Boolean(
default_value=False,
description="Also reload global config")
default_value=False,
description="Also reload global config")

result = GenericScalar()

Expand Down
6 changes: 3 additions & 3 deletions cylc/flow/scripts/reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ def get_option_parser():
)

parser.add_option(
"-g", "--global",
help="also reload global configuration.",
action="store_true", default=False, dest="reload_global")
"-g", "--global",
help="also reload global configuration.",
action="store_true", default=False, dest="reload_global")

return parser

Expand Down
26 changes: 0 additions & 26 deletions tests/unit/cfgspec/test_globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,29 +174,3 @@ def test_platform_ssh_forward_variables(mock_global_config):
''')

assert glblcfg.get(['platforms','foo','ssh forward environment variables']) == ["FOO", "BAR"]

def test_reload(mock_global_config, tmp_path):
# Load a config
glblcfg: GlobalConfig = mock_global_config(f'''
[platforms]
[[foo]]
[[[meta]]]
x = 1
''')

# Update the global config file and reload
conf_path = tmp_path / GlobalConfig.CONF_BASENAME
conf_path.write_text('''
[platforms]
[[foo]]
[[[meta]]]
x = 2
''')
glblcfg.load()

assert glblcfg.get(['platforms','foo','meta','x']) == '2'

from cylc.flow.platforms import get_platform
platform = get_platform("foo")

assert platform['meta']['x'] == "2"

0 comments on commit 9b7c1e8

Please sign in to comment.