Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrLitkevich committed Feb 7, 2025
1 parent 6f27404 commit ef9b597
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions test/integration/aeon/test_aeon.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
import os
import shutil
from subprocess import PIPE, STDOUT, run

import pytest
Expand Down Expand Up @@ -194,8 +196,21 @@ def test_cli_arguments_fail(tt_cmd, certificates, args, error):
assert error in result.stdout


def test_cli_config_file_success(tt_cmd):
cmd = [str(tt_cmd), *AeonConnectCommand, "./data/config.yml"]
def test_cli_config_file_success(tt_cmd, tmp_path):
tmp_path = os.path.join(tmp_path, "data")

shutil.copytree(
os.path.join(os.path.dirname(__file__), "data"),
tmp_path,
symlinks=True, # Сохраняем символические ссылки.
ignore=None,
copy_function=shutil.copy2, # Копируем с сохранением метаданных.
ignore_dangling_symlinks=True, # Игнорируем битые символические ссылки.
)

pathConfig = os.path.join(tmp_path, "config.yaml")

cmd = [str(tt_cmd), *AeonConnectCommand, pathConfig, "aeon-router-001"]
print(f"Run: {' '.join(cmd)}")

tt = run(
Expand Down

0 comments on commit ef9b597

Please sign in to comment.