Skip to content

Commit

Permalink
Shorten proxy_path_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinugu committed Oct 6, 2023
1 parent 5fdacde commit 54deb0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gravity/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def __init__(self, *args, **kwargs):
it_base_path = self.config.app_config.get("interactivetools_base_path", "/")
it_base_path = "/" + f"/{it_base_path.strip('/')}/".lstrip("/")
it_prefix = self.config.app_config.get("interactivetools_prefix", "interactivetool")
self.settings["proxy_path_prefix"] = f"{it_base_path}{it_prefix}/access/interactivetoolentrypoint"
self.settings["proxy_path_prefix"] = f"{it_base_path}{it_prefix}/ep"

@validator("settings")
def _validate_settings(cls, v, values):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_process_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def test_gxit_handler(default_config_manager, galaxy_yml, gxit_config, process_m
sessions = "database/interactivetools_map.sqlite"
gxit_config_contents = gxit_config_path.read_text()
assert f'npx gx-it-proxy@>={GX_IT_PROXY_MIN_VERSION} --ip localhost --port {gxit_port} --sessions {sessions}' in gxit_config_contents
assert '--proxyPathPrefix /interactivetool/access/interactivetoolentrypoint' in gxit_config_contents
assert '--proxyPathPrefix /interactivetool/ep' in gxit_config_contents


@pytest.mark.parametrize('process_manager_name', ['supervisor', 'systemd'])
Expand All @@ -344,7 +344,7 @@ def test_gxit_handler_path_prefix(default_config_manager, galaxy_yml, gxit_confi
pm.update()
gxit_config_path = service_conf_path(state_dir, process_manager_name, 'gx-it-proxy')
assert gxit_config_path.exists()
proxy_path_prefix = f'{gxit_base_path}{gxit_prefix}/access/interactivetoolentrypoint'
proxy_path_prefix = f'{gxit_base_path}{gxit_prefix}/ep'
assert f'--proxyPathPrefix {proxy_path_prefix}' in gxit_config_path.read_text()


Expand Down

0 comments on commit 54deb0c

Please sign in to comment.