edge-containers-cli 5.4.0__tar.gz → 5.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/PKG-INFO +1 -1
  2. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/_version.py +3 -3
  3. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/cmds/commands.py +15 -10
  4. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli.egg-info/PKG-INFO +1 -1
  5. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli.egg-info/scm_version.json +2 -2
  6. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/test_argocd.py +14 -14
  7. edge_containers_cli-5.4.1/tests/test_demo.py +57 -0
  8. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/test_k8s.py +5 -5
  9. edge_containers_cli-5.4.0/tests/test_demo.py +0 -57
  10. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.copier-answers.yml +0 -0
  11. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.devcontainer/devcontainer.json +0 -0
  12. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.dockerignore +0 -0
  13. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/CONTRIBUTING.md +0 -0
  14. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  15. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/ISSUE_TEMPLATE/issue.md +0 -0
  16. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +0 -0
  17. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/pages/index.html +0 -0
  18. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/pages/make_switcher.py +0 -0
  19. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/workflows/_container.yml +0 -0
  20. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/workflows/_dist.yml +0 -0
  21. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/workflows/_docs.yml +0 -0
  22. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/workflows/_pypi.yml +0 -0
  23. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/workflows/_release.yml +0 -0
  24. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/workflows/_test.yml +0 -0
  25. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/workflows/_tox.yml +0 -0
  26. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/workflows/ci.yml +0 -0
  27. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.github/workflows/periodic.yml +0 -0
  28. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.gitignore +0 -0
  29. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.gitleaks.toml +0 -0
  30. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.pre-commit-config.yaml +0 -0
  31. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.python-version +0 -0
  32. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.vscode/extensions.json +0 -0
  33. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.vscode/launch.json +0 -0
  34. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.vscode/settings.json +0 -0
  35. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/.vscode/tasks.json +0 -0
  36. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/Dockerfile +0 -0
  37. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/LICENSE +0 -0
  38. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/README.md +0 -0
  39. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/_api.rst +0 -0
  40. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/_templates/custom-module-template.rst +0 -0
  41. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/conf.py +0 -0
  42. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/explanations/decisions/0001-record-architecture-decisions.md +0 -0
  43. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/explanations/decisions/0002-switched-to-python-copier-template.md +0 -0
  44. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/explanations/decisions/COPYME +0 -0
  45. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/explanations/decisions.md +0 -0
  46. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/explanations.md +0 -0
  47. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/genindex.md +0 -0
  48. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/how-to/contribute.md +0 -0
  49. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/how-to/run-container.md +0 -0
  50. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/how-to.md +0 -0
  51. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/images/dls-favicon.ico +0 -0
  52. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/images/dls-logo.svg +0 -0
  53. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/images/ec-logs.png +0 -0
  54. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/images/ec-web.png +0 -0
  55. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/index.md +0 -0
  56. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/reference/cli.md +0 -0
  57. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/reference/environment-variables.md +0 -0
  58. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/reference.md +0 -0
  59. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/tutorials/installation.md +0 -0
  60. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/docs/tutorials.md +0 -0
  61. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/pyproject.toml +0 -0
  62. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/renovate.json +0 -0
  63. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/setup.cfg +0 -0
  64. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/__init__.py +0 -0
  65. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/__main__.py +0 -0
  66. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/autocomplete.py +0 -0
  67. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/backend.py +0 -0
  68. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/cli.py +0 -0
  69. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/cmds/__init__.py +0 -0
  70. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/cmds/argo_commands.py +0 -0
  71. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/cmds/demo_commands.py +0 -0
  72. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/cmds/helm.py +0 -0
  73. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/cmds/k8s_commands.py +0 -0
  74. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/cmds/monitor.py +0 -0
  75. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/cmds/monitor.tcss +0 -0
  76. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/definitions.py +0 -0
  77. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/git.py +0 -0
  78. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/globals.py +0 -0
  79. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/logging.py +0 -0
  80. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/shell.py +0 -0
  81. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli/utils.py +0 -0
  82. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli.egg-info/SOURCES.txt +0 -0
  83. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli.egg-info/dependency_links.txt +0 -0
  84. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli.egg-info/entry_points.txt +0 -0
  85. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli.egg-info/requires.txt +0 -0
  86. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli.egg-info/scm_file_list.json +0 -0
  87. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/src/edge_containers_cli.egg-info/top_level.txt +0 -0
  88. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/__init__.py +0 -0
  89. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/conftest.py +0 -0
  90. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/argocd.yaml +0 -0
  91. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-deployment/apps/Chart.yaml +0 -0
  92. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-deployment/apps/values.yaml +0 -0
  93. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/bl01t-ea-test-01/Chart.yaml +0 -0
  94. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/bl01t-ea-test-01/config/ioc.db +0 -0
  95. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/bl01t-ea-test-01/config/ioc.yaml +0 -0
  96. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/bl01t-ea-test-01/templates/configmap.yaml +0 -0
  97. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/bl01t-ea-test-01/values.yaml +0 -0
  98. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/bl01t-ea-test-02/Chart.yaml +0 -0
  99. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/bl01t-ea-test-02/values.yaml +0 -0
  100. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/dls-aravis/Chart.yaml +0 -0
  101. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/dls-aravis/config/ioc.yaml +0 -0
  102. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/dls-aravis/templates/configmap.yaml +0 -0
  103. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/dls-aravis/values.yaml +0 -0
  104. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/bl01t-services/services/values.yaml +0 -0
  105. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/cli.yaml +0 -0
  106. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/k8s.yaml +0 -0
  107. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/data/yaml.yaml +0 -0
  108. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/test_cli.py +0 -0
  109. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/test_git.py +0 -0
  110. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/test_monitor.py +2 -2
  111. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/test_push_rejection.py +0 -0
  112. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/tests/test_unit.py +0 -0
  113. {edge_containers_cli-5.4.0 → edge_containers_cli-5.4.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edge-containers-cli
3
- Version: 5.4.0
3
+ Version: 5.4.1
4
4
  Summary: CLI for deploying and managing epics containers IOCs and services
5
5
  Author-email: Giles Knap <giles.knap@gmail.com>
6
6
  License: Apache License
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '5.4.0'
22
- __version_tuple__ = version_tuple = (5, 4, 0)
21
+ __version__ = version = '5.4.1'
22
+ __version_tuple__ = version_tuple = (5, 4, 1)
23
23
 
24
- __commit_id__ = commit_id = 'ge3b4c5ecd'
24
+ __commit_id__ = commit_id = 'g33d7fa33f'
@@ -19,23 +19,28 @@ class CommandError(Exception):
19
19
  pass
20
20
 
21
21
 
22
- # The columns of `ec ps` and `ec monitor`, modelled on argocd-monitor's
23
- # Applications table (github.com/epics-containers/argocd-monitor,
24
- # src/components/app-table/columns.tsx):
25
- # health - Argo CD health vocabulary: Healthy, Progressing, Degraded,
26
- # Suspended, Missing or Unknown, with " (Stopped)" appended
27
- # when the service has been stopped with `ec stop`
28
- # sync - Argo CD sync vocabulary: Synced, OutOfSync or Unknown
29
- # last sync - when the last sync operation finished
30
- # properties - the service's labels, shown only by `ec ps --wide`
22
+ # The columns of `ec ps` and `ec monitor`, in the same order as
23
+ # argocd-monitor's Applications overview table (github.com/epics-containers/
24
+ # argocd-monitor, src/components/app-table/columns.tsx: name, description,
25
+ # health, sync, namespace, revision, last sync, properties). ec has no
26
+ # namespace column, and maps argocd-monitor's "Target Revision" to
27
+ # "version" and "Properties" (labels) to "properties":
28
+ # description - the service's free-text description
29
+ # health - Argo CD health vocabulary: Healthy, Progressing, Degraded,
30
+ # Suspended, Missing or Unknown, with " (Stopped)" appended
31
+ # when the service has been stopped with `ec stop`
32
+ # sync - Argo CD sync vocabulary: Synced, OutOfSync or Unknown
33
+ # last sync - when the last sync operation finished
34
+ # properties - the service's labels, shown only by `ec ps --wide`, as
35
+ # argocd-monitor's Properties column
31
36
  ServicesSchema = polars.Schema(
32
37
  {
33
38
  "name": polars.String, # type: ignore
39
+ "description": polars.String,
34
40
  "health": polars.String,
35
41
  "sync": polars.String,
36
42
  "version": polars.String,
37
43
  "last sync": polars.String,
38
- "description": polars.String,
39
44
  "properties": polars.String,
40
45
  }
41
46
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edge-containers-cli
3
- Version: 5.4.0
3
+ Version: 5.4.1
4
4
  Summary: CLI for deploying and managing epics containers IOCs and services
5
5
  Author-email: Giles Knap <giles.knap@gmail.com>
6
6
  License: Apache License
@@ -1,7 +1,7 @@
1
1
  {
2
- "tag": "5.4.0",
2
+ "tag": "5.4.1",
3
3
  "distance": 0,
4
- "node": "ge3b4c5ecd2ee1244b6d554c493400f56f11db33f",
4
+ "node": "g33d7fa33f6f615ce25c4baac26ff7f2c3306598e",
5
5
  "dirty": false,
6
6
  "branch": "HEAD",
7
7
  "node_date": "2026-09-22"
@@ -500,20 +500,20 @@ def yaml_dump(data) -> str:
500
500
  # in properties, argocd.argoproj.io/instance is hidden and the
501
501
  # argocd.argoproj.io/ prefix is stripped - all as argocd-monitor does
502
502
  PS_EXPECT = (
503
- "╭──────────────────┬───────────────────┬───────────┬──────────┬──────────────────────┬─────────────────╮\n"
504
- "│ name │ health │ sync │ version │ last sync │ description │\n"
505
- "├──────────────────┼───────────────────┼───────────┼──────────┼──────────────────────┼─────────────────┤\n"
506
- "│ bl01t-di-cam-01 │ Progressing │ OutOfSync │ main │ │ │\n"
507
- "│ bl01t-ea-test-01 │ Healthy │ Synced │ 2024.7.1 │ 2026-09-22T09:03:19Z │ my nice service │\n"
508
- "│ bl01t-mo-sim-01 │ Healthy (Stopped) │ Synced │ 2024.7.2 │ 2026-09-21T14:12:02Z │ │\n"
509
- "╰──────────────────┴───────────────────┴───────────┴──────────┴──────────────────────┴─────────────────╯\n"
503
+ "╭──────────────────┬─────────────────┬───────────────────┬───────────┬──────────┬──────────────────────╮\n"
504
+ "│ name │ description │ health │ sync │ version │ last sync │\n"
505
+ "├──────────────────┼─────────────────┼───────────────────┼───────────┼──────────┼──────────────────────┤\n"
506
+ "│ bl01t-di-cam-01 │ │ Progressing │ OutOfSync │ main │ │\n"
507
+ "│ bl01t-ea-test-01 │ my nice service │ Healthy │ Synced │ 2024.7.1 │ 2026-09-22T09:03:19Z │\n"
508
+ "│ bl01t-mo-sim-01 │ │ Healthy (Stopped) │ Synced │ 2024.7.2 │ 2026-09-21T14:12:02Z │\n"
509
+ "╰──────────────────┴─────────────────┴───────────────────┴───────────┴──────────┴──────────────────────╯\n"
510
510
  )
511
511
  PS_WIDE_EXPECT = (
512
- "╭──────────────────┬───────────────────┬───────────┬──────────┬──────────────────────┬─────────────────┬────────────────────────────╮\n"
513
- "│ name │ health │ sync │ version │ last sync │ description │ properties │\n"
514
- "├──────────────────┼───────────────────┼───────────┼──────────┼──────────────────────┼─────────────────┼────────────────────────────┤\n"
515
- "│ bl01t-di-cam-01 │ Progressing │ OutOfSync │ main │ │ │ │\n"
516
- "│ bl01t-ea-test-01 │ Healthy │ Synced │ 2024.7.1 │ 2026-09-22T09:03:19Z │ my nice service │ location=bench team=optics │\n"
517
- "│ bl01t-mo-sim-01 │ Healthy (Stopped) │ Synced │ 2024.7.2 │ 2026-09-21T14:12:02Z │ │ │\n"
518
- "╰──────────────────┴───────────────────┴───────────┴──────────┴──────────────────────┴─────────────────┴────────────────────────────╯\n"
512
+ "╭──────────────────┬─────────────────┬───────────────────┬───────────┬──────────┬──────────────────────┬────────────────────────────╮\n"
513
+ "│ name │ description │ health │ sync │ version │ last sync │ properties │\n"
514
+ "├──────────────────┼─────────────────┼───────────────────┼───────────┼──────────┼──────────────────────┼────────────────────────────┤\n"
515
+ "│ bl01t-di-cam-01 │ │ Progressing │ OutOfSync │ main │ │ │\n"
516
+ "│ bl01t-ea-test-01 │ my nice service │ Healthy │ Synced │ 2024.7.1 │ 2026-09-22T09:03:19Z │ location=bench team=optics │\n"
517
+ "│ bl01t-mo-sim-01 │ │ Healthy (Stopped) │ Synced │ 2024.7.2 │ 2026-09-21T14:12:02Z │ │\n"
518
+ "╰──────────────────┴─────────────────┴───────────────────┴───────────┴──────────┴──────────────────────┴────────────────────────────╯\n"
519
519
  )
@@ -0,0 +1,57 @@
1
+ import pytest
2
+
3
+ from edge_containers_cli.cmds.commands import CommandError
4
+
5
+
6
+ def test_logs(mock_run, DEMO):
7
+ mock_run.run_cli("logs demo-ea-01")
8
+
9
+
10
+ def test_log_history(mock_run, DEMO):
11
+ mock_run.run_cli("log-history demo-ea-01")
12
+
13
+
14
+ def test_restart(mock_run, DEMO):
15
+ mock_run.run_cli("restart demo-ea-01")
16
+
17
+
18
+ def test_start(mock_run, DEMO):
19
+ mock_run.run_cli("start demo-ea-01")
20
+
21
+
22
+ def test_stop(mock_run, DEMO):
23
+ mock_run.run_cli("stop demo-ea-01")
24
+
25
+
26
+ def test_set_desc(mock_run, DEMO):
27
+ # `Commands.set_description` is now abstract - DemoCommands must
28
+ # implement it (a real decision, e.g. a CommandError like the
29
+ # plain-k8s backend, or a validate-and-no-op like this) rather than
30
+ # silently inheriting the base's `raise NotImplementedError`.
31
+ mock_run.run_cli("set-desc demo-ea-01 new-description")
32
+
33
+
34
+ def test_set_desc_unknown_service(mock_run, DEMO):
35
+ with pytest.raises(CommandError, match="not found"):
36
+ mock_run.run_cli("set-desc no-such-service new-description")
37
+
38
+
39
+ def test_ps(mock_run, DEMO, wide_console):
40
+ expect = (
41
+ "╭────────────┬────────────────┬─────────┬────────┬─────────┬──────────────────────╮\n"
42
+ "│ name │ description │ health │ sync │ version │ last sync │\n"
43
+ "├────────────┼────────────────┼─────────┼────────┼─────────┼──────────────────────┤\n"
44
+ "│ demo-ea-00 │ demo-device-00 │ Healthy │ Synced │ 1.0.25 │ 2024-10-22T11:23:08Z │\n"
45
+ "│ demo-ea-01 │ demo-device-01 │ Healthy │ Synced │ 1.0.24 │ 2024-10-22T11:23:03Z │\n"
46
+ "│ demo-ea-02 │ demo-device-02 │ Healthy │ Synced │ 1.0.23 │ 2024-10-22T11:23:04Z │\n"
47
+ "│ demo-ea-03 │ demo-device-03 │ Healthy │ Synced │ 1.0.22 │ 2024-10-22T11:23:07Z │\n"
48
+ "│ demo-ea-04 │ demo-device-04 │ Healthy │ Synced │ 1.0.21 │ 2024-10-22T11:23:01Z │\n"
49
+ "│ demo-ea-05 │ demo-device-05 │ Healthy │ Synced │ 1.0.20 │ 2024-10-22T11:23:03Z │\n"
50
+ "│ demo-ea-06 │ demo-device-06 │ Healthy │ Synced │ 1.0.19 │ 2024-10-22T11:23:07Z │\n"
51
+ "│ demo-ea-07 │ demo-device-07 │ Healthy │ Synced │ 1.0.18 │ 2024-10-22T11:23:01Z │\n"
52
+ "╰────────────┴────────────────┴─────────┴────────┴─────────┴──────────────────────╯\n"
53
+ )
54
+
55
+ res = mock_run.run_cli("ps")
56
+
57
+ assert expect in res
@@ -84,11 +84,11 @@ def test_stop(mock_run, K8S):
84
84
 
85
85
 
86
86
  K8S_PS_EXPECT = (
87
- "╭──────────────────┬─────────┬──────┬───────────────┬──────────────────────┬─────────────╮\n"
88
- "│ name │ health │ sync │ version │ last sync │ description │\n"
89
- "├──────────────────┼─────────┼──────┼───────────────┼──────────────────────┼─────────────┤\n"
90
- "│ bl01t-ea-test-01 │ Healthy │ │ 2024.7.824f-b │ 2024-07-26T08:16:07Z │ │\n"
91
- "╰──────────────────┴─────────┴──────┴───────────────┴──────────────────────┴─────────────╯\n"
87
+ "╭──────────────────┬─────────────┬─────────┬──────┬───────────────┬──────────────────────╮\n"
88
+ "│ name │ description │ health │ sync │ version │ last sync │\n"
89
+ "├──────────────────┼─────────────┼─────────┼──────┼───────────────┼──────────────────────┤\n"
90
+ "│ bl01t-ea-test-01 │ │ Healthy │ │ 2024.7.824f-b │ 2024-07-26T08:16:07Z │\n"
91
+ "╰──────────────────┴─────────────┴─────────┴──────┴───────────────┴──────────────────────╯\n"
92
92
  )
93
93
 
94
94
 
@@ -1,57 +0,0 @@
1
- import pytest
2
-
3
- from edge_containers_cli.cmds.commands import CommandError
4
-
5
-
6
- def test_logs(mock_run, DEMO):
7
- mock_run.run_cli("logs demo-ea-01")
8
-
9
-
10
- def test_log_history(mock_run, DEMO):
11
- mock_run.run_cli("log-history demo-ea-01")
12
-
13
-
14
- def test_restart(mock_run, DEMO):
15
- mock_run.run_cli("restart demo-ea-01")
16
-
17
-
18
- def test_start(mock_run, DEMO):
19
- mock_run.run_cli("start demo-ea-01")
20
-
21
-
22
- def test_stop(mock_run, DEMO):
23
- mock_run.run_cli("stop demo-ea-01")
24
-
25
-
26
- def test_set_desc(mock_run, DEMO):
27
- # `Commands.set_description` is now abstract - DemoCommands must
28
- # implement it (a real decision, e.g. a CommandError like the
29
- # plain-k8s backend, or a validate-and-no-op like this) rather than
30
- # silently inheriting the base's `raise NotImplementedError`.
31
- mock_run.run_cli("set-desc demo-ea-01 new-description")
32
-
33
-
34
- def test_set_desc_unknown_service(mock_run, DEMO):
35
- with pytest.raises(CommandError, match="not found"):
36
- mock_run.run_cli("set-desc no-such-service new-description")
37
-
38
-
39
- def test_ps(mock_run, DEMO, wide_console):
40
- expect = (
41
- "╭────────────┬─────────┬────────┬─────────┬──────────────────────┬────────────────╮\n"
42
- "│ name │ health │ sync │ version │ last sync │ description │\n"
43
- "├────────────┼─────────┼────────┼─────────┼──────────────────────┼────────────────┤\n"
44
- "│ demo-ea-00 │ Healthy │ Synced │ 1.0.25 │ 2024-10-22T11:23:08Z │ demo-device-00 │\n"
45
- "│ demo-ea-01 │ Healthy │ Synced │ 1.0.24 │ 2024-10-22T11:23:03Z │ demo-device-01 │\n"
46
- "│ demo-ea-02 │ Healthy │ Synced │ 1.0.23 │ 2024-10-22T11:23:04Z │ demo-device-02 │\n"
47
- "│ demo-ea-03 │ Healthy │ Synced │ 1.0.22 │ 2024-10-22T11:23:07Z │ demo-device-03 │\n"
48
- "│ demo-ea-04 │ Healthy │ Synced │ 1.0.21 │ 2024-10-22T11:23:01Z │ demo-device-04 │\n"
49
- "│ demo-ea-05 │ Healthy │ Synced │ 1.0.20 │ 2024-10-22T11:23:03Z │ demo-device-05 │\n"
50
- "│ demo-ea-06 │ Healthy │ Synced │ 1.0.19 │ 2024-10-22T11:23:07Z │ demo-device-06 │\n"
51
- "│ demo-ea-07 │ Healthy │ Synced │ 1.0.18 │ 2024-10-22T11:23:01Z │ demo-device-07 │\n"
52
- "╰────────────┴─────────┴────────┴─────────┴──────────────────────┴────────────────╯\n"
53
- )
54
-
55
- res = mock_run.run_cli("ps")
56
-
57
- assert expect in res
@@ -119,11 +119,11 @@ def test_monitor_columns():
119
119
  columns = [str(column.key.value) for column in table.ordered_columns]
120
120
  assert columns == [
121
121
  "name",
122
+ "description",
122
123
  "health",
123
124
  "sync",
124
125
  "version",
125
126
  "last sync",
126
- "description",
127
127
  ]
128
128
 
129
129
  assert table.row_count == 8
@@ -143,11 +143,11 @@ def test_monitor_columns_wide():
143
143
  columns = [str(column.key.value) for column in table.ordered_columns]
144
144
  assert columns == [
145
145
  "name",
146
+ "description",
146
147
  "health",
147
148
  "sync",
148
149
  "version",
149
150
  "last sync",
150
- "description",
151
151
  "properties",
152
152
  ]
153
153