Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osism/commands/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def get_parser(self, prog_name):
action="store_true",
)
parser.add_argument(
"--cloud", type=str, help="Cloud name in clouds.yaml", default="openstack"
"--cloud", type=str, help="Cloud name in clouds.yaml", default="admin"
)
parser.add_argument(
"--filter",
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/commands/test_manage_wiring.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ def _stub_args(**overrides) -> MagicMock:
return args


def test_images_cloud_default_matches_shipped_profile():
# The shipped cfg-cookiecutter clouds.yml provides 'admin' (not 'openstack'),
# so a bare `osism manage images` must default to a profile that exists.
cmd = manage.Images(MagicMock(), MagicMock())
parser = cmd.get_parser("manage images")
args = parser.parse_args([])
assert args.cloud == "admin"


def test_w1_octavia_wires_validators_to_call_sites():
cmd = manage.ImageOctavia(MagicMock(), MagicMock())
args = _stub_args()
Expand Down