Skip to content

Commit

Permalink
Simplyfy testing
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelldls committed Aug 7, 2024
1 parent bae04ed commit 1c3855a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 252 deletions.
57 changes: 0 additions & 57 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,10 @@ def mktempdir() -> Path:

@fixture
def mock_run(mocker):
# Patch globals
# mocker.patch(
# "edge_containers_cli.globals.EC_K8S_NAMESPACE",
# "bl01t",
# )
# mocker.patch(
# "edge_containers_cli.globals.EC_SERVICES_REPO",
# "https://github.com/epics-containers/bl01t",
# )
# mocker.patch(
# "edge_containers_cli.globals.EC_DEBUG",
# "1",
# )
mocker.patch(
"edge_containers_cli.globals.CACHE_ROOT",
TMPDIR,
)
mocker.patch(
"edge_containers_cli.globals.CACHE_EXPIRY",
0,
)

# Patch functions
mocker.patch("webbrowser.open", MOCKRUN.run_interactive)
Expand All @@ -189,14 +172,6 @@ def data() -> Path:
return DATA_PATH


@fixture()
def ctx():
ctx = Context
ctx.parent = Context # type: ignore
ctx.parent.params = {} # type: ignore
return ctx


@fixture()
def K8S(mocker, data):
mocker.patch.dict(
Expand Down Expand Up @@ -239,35 +214,3 @@ def ARGOCD(mocker, data):
file = Path(__file__).parent / "data" / "argocd.yaml"
yaml = YAML(typ="safe").load(file)
return SimpleNamespace(**yaml)


@fixture()
def ec_cli(data):
file = Path(__file__).parent / "data" / "cli.yaml"
yaml = YAML(typ="safe").load(file)
return SimpleNamespace(**yaml)


@fixture()
def local(data, mocker):
file = Path(__file__).parent / "data" / "local.yaml"
mocker.patch(
"edge_containers_cli.globals.EC_K8S_NAMESPACE",
"local",
)
yaml = YAML(typ="safe").load(file)
return SimpleNamespace(**yaml)


@fixture()
def dev(data):
file = Path(__file__).parent / "data" / "dev.yaml"
yaml = YAML(typ="safe").load(file)
return SimpleNamespace(**yaml)


@fixture()
def autocomplete(data):
file = Path(__file__).parent / "data" / "autocomplete.yaml"
yaml = YAML(typ="safe").load(file)
return SimpleNamespace(**yaml)
62 changes: 0 additions & 62 deletions tests/data/autocomplete.yaml

This file was deleted.

84 changes: 0 additions & 84 deletions tests/test_autocomplete.py

This file was deleted.

49 changes: 0 additions & 49 deletions tests/test_system.py

This file was deleted.

0 comments on commit 1c3855a

Please sign in to comment.