Skip to content

Commit 389bffa

Browse files
authored
Merge pull request #88 from axem-solutions/DEM-163
list and info command status outputs clarified.
2 parents 3fc3d31 + 5d9e9b6 commit 389bffa

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

dem/cli/command/info_cmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from rich.table import Table
99

1010
image_status_messages = {
11-
ToolImages.NOT_AVAILABLE: "[red]Error: Image is not available.[/]",
11+
ToolImages.NOT_AVAILABLE: "[red]Error: Required image is not available![/]",
1212
ToolImages.LOCAL_ONLY: "Image is available locally.",
1313
ToolImages.REGISTRY_ONLY: "Image is available in the registry.",
1414
ToolImages.LOCAL_AND_REGISTRY: "Image is available locally and in the registry.",

dem/cli/command/list_cmd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
(
1111
DEV_ENV_ORG_NOT_IN_REGISTRY,
1212
DEV_ENV_ORG_INSTALLED_LOCALLY,
13-
DEV_ENV_ORG_REAINSTALL,
13+
DEV_ENV_ORG_REINSTALL,
1414
DEV_ENV_ORG_READY,
1515
) = range(4)
1616

@@ -23,13 +23,13 @@
2323
dev_env_org_status_messages = {
2424
DEV_ENV_ORG_NOT_IN_REGISTRY: "[red]Error: Required image is not available in the registry![/]",
2525
DEV_ENV_ORG_INSTALLED_LOCALLY: "Installed locally.",
26-
DEV_ENV_ORG_REAINSTALL: "Incomplete local install. Reinstall needed.",
26+
DEV_ENV_ORG_REINSTALL: "Incomplete local install. The missing images are available in the registry. Use `dem pull` to reinstall.",
2727
DEV_ENV_ORG_READY: "Ready to be installed.",
2828
}
2929

3030
dev_env_local_status_messages = {
3131
DEV_ENV_LOCAL_NOT_AVAILABLE: "[red]Error: Required image is not available![/]",
32-
DEV_ENV_LOCAL_REINSTALL: "Incopmlete local install. Reinstall needed.",
32+
DEV_ENV_LOCAL_REINSTALL: "Incomplete local install. The missing images are available in the registry. Use `dem pull` to reinstall.",
3333
DEV_ENV_LOCAL_INSTALLED: "Installed.",
3434
}
3535

@@ -42,7 +42,7 @@ def get_catalog_dev_env_status(platform: DevEnvLocalSetup, dev_env: DevEnv) -> s
4242
dev_env_status = dev_env_org_status_messages[DEV_ENV_ORG_INSTALLED_LOCALLY]
4343
else:
4444
if (platform.get_local_dev_env(dev_env) is not None):
45-
dev_env_status = dev_env_org_status_messages[DEV_ENV_ORG_REAINSTALL]
45+
dev_env_status = dev_env_org_status_messages[DEV_ENV_ORG_REINSTALL]
4646
else:
4747
dev_env_status = dev_env_org_status_messages[DEV_ENV_ORG_READY]
4848
return dev_env_status

tests/cli/test_info_cmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ def stub_check_image_availability(*args, **kwargs):
146146
fake_dev_env.check_image_availability.assert_called_once_with(fake_platform.tool_images)
147147

148148
expected_tools = [
149-
["build system", "axemsolutions/bazel:latest", "[red]Error: Image is not available.[/]"],
150-
["toolchain", "axemsolutions/gnu_arm:latest", "[red]Error: Image is not available.[/]"],
149+
["build system", "axemsolutions/bazel:latest", "[red]Error: Required image is not available![/]"],
150+
["toolchain", "axemsolutions/gnu_arm:latest", "[red]Error: Required image is not available![/]"],
151151
["debugger", "axemsolutions/jlink:latest", "Image is available locally."],
152152
["deployer", "axemsolutions/jlink:latest", "Image is available locally."],
153153
["test framework", "axemsolutions/cpputest:latest", "Image is available locally and in the registry."],

tests/cli/test_list_cmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_with_valid_dev_env_org_json(mock_DevEnvLocalSetup):
131131
expected_dev_env_list = [
132132
["org_only_env", "Ready to be installed."],
133133
["demo", "Installed locally."],
134-
["nagy_cica_project", "Incomplete local install. Reinstall needed."],
134+
["nagy_cica_project", "Incomplete local install. The missing images are available in the registry. Use `dem pull` to reinstall."],
135135
["unavailable_image_env", "[red]Error: Required image is not available in the registry![/]"]
136136
]
137137
fake_image_statuses = [

0 commit comments

Comments
 (0)