Skip to content

Commit ab3fa31

Browse files
committed
(fix) removed unused code
1 parent ef9207c commit ab3fa31

2 files changed

Lines changed: 2 additions & 30 deletions

File tree

tests/e2e/features/environment.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
remove_config_backup,
3333
restart_container,
3434
switch_config,
35-
switch_run_config,
3635
)
3736

3837
FALLBACK_MODEL = "gpt-4o-mini"
@@ -506,7 +505,6 @@ def before_feature(context: Context, feature: Feature) -> None:
506505
f"tests/e2e/configuration/{mode_dir}/lightspeed-stack-tls.yaml"
507506
)
508507
context.default_config_backup = create_config_backup("lightspeed-stack.yaml")
509-
context.run_yaml_backup = create_config_backup("run.yaml")
510508
switch_config(context.feature_config)
511509

512510

@@ -559,9 +557,7 @@ def after_feature(context: Context, feature: Feature) -> None:
559557

560558
if "TLS" in feature.tags:
561559
switch_config(context.default_config_backup)
562-
run_backup = getattr(context, "run_yaml_backup", None)
563-
if run_backup:
564-
switch_run_config(run_backup)
565-
remove_config_backup(run_backup)
560+
remove_config_backup(context.default_config_backup)
566561
if not context.is_library_mode:
567562
restart_container("llama-stack")
563+
restart_container("lightspeed-stack")

tests/e2e/utils/utils.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -208,30 +208,6 @@ def http_response_json_or_responses_sse_terminal(response: Any) -> Any:
208208
return response.json()
209209

210210

211-
def switch_run_config(source_path: str, destination_path: str = "run.yaml") -> None:
212-
"""Overwrite the Llama Stack run config at `destination_path` with `source_path`.
213-
214-
Parameters:
215-
source_path (str): Path to the replacement run configuration file.
216-
destination_path (str): Path to the run config file to be
217-
overwritten (defaults to "run.yaml").
218-
219-
Raises:
220-
FileNotFoundError: If source_path does not exist.
221-
PermissionError: If the file cannot be read or destination cannot be
222-
written due to permissions.
223-
OSError: For other OS-related failures during the copy operation.
224-
"""
225-
if is_prow_environment():
226-
return
227-
228-
try:
229-
shutil.copy(source_path, destination_path)
230-
except (FileNotFoundError, PermissionError, OSError) as e:
231-
print(f"Failed to copy run config file: {e}")
232-
raise
233-
234-
235211
def switch_config(
236212
source_path: str, destination_path: str = "lightspeed-stack.yaml"
237213
) -> None:

0 commit comments

Comments
 (0)