Skip to content

Commit

Permalink
Remove need for top level edition directories
Browse files Browse the repository at this point in the history
Change-Id: Ie5b965f6c69f293d185abc905b6a4fa9de2361c6
  • Loading branch information
LarsMichelsen committed Dec 18, 2023
1 parent cfe0787 commit fb409a9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
4 changes: 2 additions & 2 deletions tests/code_quality/file_content/test_find_debug_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import pytest

from tests.testlib import cmc_path, cme_path, repo_path
from tests.testlib import cmc_path, repo_path

from ..conftest import ChangedFiles

Expand Down Expand Up @@ -57,7 +57,7 @@ def test_find_debugs_false(changed_files: ChangedFiles, line: str) -> None:
"path",
[
p #
for base_path in [repo_path(), cmc_path(), cme_path()] #
for base_path in [repo_path(), cmc_path()] #
for dir_path in check_paths #
for p in [base_path / dir_path]
if p.exists()
Expand Down
2 changes: 0 additions & 2 deletions tests/testlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from tests.testlib.utils import (
add_python_paths,
cmc_path,
cme_path,
current_branch_name,
get_cmk_download_credentials,
get_standard_linux_agent_output,
Expand Down Expand Up @@ -434,7 +433,6 @@ def on_time(utctime: datetime.datetime | str | int | float, timezone: str) -> It

__all__ = [
"cmc_path",
"cme_path",
"repo_path",
"add_python_paths",
"create_linux_test_host",
Expand Down
6 changes: 0 additions & 6 deletions tests/testlib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from tests.testlib.utils import (
check_output,
cmc_path,
cme_path,
cse_openid_oauth_provider,
current_base_branch_name,
current_branch_version,
Expand Down Expand Up @@ -753,11 +752,6 @@ def _update_with_f12_files(self) -> None:
# cmc_path() / "agents",
]

if os.path.exists(cme_path()) and self.version.is_managed_edition():
paths += [
cme_path(),
]

for path in paths:
if os.path.exists("%s/.f12" % path):
logger.info("Executing .f12 in '%s' ...", path)
Expand Down
18 changes: 3 additions & 15 deletions tests/testlib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,32 +66,20 @@ def cmc_path() -> Path:
return repo_path() / "enterprise"


def cme_path() -> Path:
return repo_path() / "managed"


def cce_path() -> Path:
return repo_path() / "cloud"


def cse_path() -> Path:
return repo_path() / "saas"


def is_enterprise_repo() -> bool:
return cmc_path().exists()


def is_managed_repo() -> bool:
return cme_path().exists()
return (repo_path() / "omd" / "packages" / "managed").exists()


def is_cloud_repo() -> bool:
return cce_path().exists()
return (repo_path() / "omd" / "packages" / "cloud").exists()


def is_saas_repo() -> bool:
return cse_path().exists()
return (repo_path() / "omd" / "packages" / "saas").exists()


def is_containerized() -> bool:
Expand Down

0 comments on commit fb409a9

Please sign in to comment.