Skip to content

Commit c67f1ea

Browse files
author
Andrei Neagu
committed
adding more debug details
1 parent d1a62b0 commit c67f1ea

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/service-integration/src/service_integration/cli/_escaping.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@ def legacy_escape(
3535
] = Path(OSPARC_CONFIG_DIRNAME),
3636
):
3737
"""Escapes the `$${` with `$$$${` in all .y*ml files in the osparc config directory."""
38+
39+
if not osparc_config_dirname.exists():
40+
msg = "Invalid path to metadata file or folder"
41+
raise typer.BadParameter(msg)
42+
43+
print(f"checking files in {osparc_config_dirname}")
44+
3845
for file in osparc_config_dirname.glob("*.y*ml"):
46+
print(f"scanning {file=}")
3947
read_text = file.read_text()
4048
replaced_text = escape_dollar_brace(read_text)
4149
if read_text != replaced_text:

packages/service-integration/tests/test_cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# pylint:disable=redefined-outer-name
2+
13
import os
24
import shutil
35
import traceback
@@ -49,6 +51,6 @@ def test_cli_legacy_escape(copy_tests_data_dir: Path, run_program_with_args: Cal
4951
assert result.exit_code == os.EX_OK, _format_cli_error(result)
5052
# NOTE only 1 file will have a sequnce that will be escaped
5153
assert (
52-
result.output.strip()
53-
== f"Escaped sequnce in {copy_tests_data_dir}/docker-compose-meta.yml"
54+
f"Escaped sequnce in {copy_tests_data_dir}/docker-compose-meta.yml"
55+
in result.output.strip()
5456
)

0 commit comments

Comments
 (0)