diff --git a/src/snowflake/cli/plugins/object/commands.py b/src/snowflake/cli/plugins/object/commands.py index a73919dd08..fd827eb512 100644 --- a/src/snowflake/cli/plugins/object/commands.py +++ b/src/snowflake/cli/plugins/object/commands.py @@ -58,7 +58,7 @@ def drop(object_type: str = ObjectArgument, object_name: str = NameArgument, **o return QueryResult(ObjectManager().drop(object_type=object_type, name=object_name)) -# Image repository is only supported object that does not have a DESCRIBE command. +# Image repository is the only supported object that does not have a DESCRIBE command. DESCRIBE_SUPPORTED_TYPES_MSG = f"\n\nSupported types: {', '.join(obj for obj in SUPPORTED_OBJECTS if obj != 'image-repository')}" diff --git a/src/snowflake/cli/plugins/object/manager.py b/src/snowflake/cli/plugins/object/manager.py index b5d46ddf4b..04e05b424b 100644 --- a/src/snowflake/cli/plugins/object/manager.py +++ b/src/snowflake/cli/plugins/object/manager.py @@ -28,7 +28,7 @@ def drop(self, *, object_type, name: str) -> SnowflakeCursor: return self._execute_query(f"drop {object_name} {name}") def describe(self, *, object_type: str, name: str): - # Image repository is only supported object that does not have a DESCRIBE command. + # Image repository is the only supported object that does not have a DESCRIBE command. if object_type == "image-repository": raise ClickException( f"Describe is currently not supported for object of type image-repository" diff --git a/tests/object/__snapshots__/test_object.ambr b/tests/object/__snapshots__/test_object.ambr index 8a9395944c..a2cb01cf10 100644 --- a/tests/object/__snapshots__/test_object.ambr +++ b/tests/object/__snapshots__/test_object.ambr @@ -230,7 +230,7 @@ # name: test_describe_fails_image_repository ''' ╭─ Error ──────────────────────────────────────────────────────────────────────╮ - │ Object of type image_repository is not supported. │ + │ Describe is currently not supported for object of type image-repository │ ╰──────────────────────────────────────────────────────────────────────────────╯ ''' diff --git a/tests/object/test_object.py b/tests/object/test_object.py index 743bad43c4..c710e274a3 100644 --- a/tests/object/test_object.py +++ b/tests/object/test_object.py @@ -83,7 +83,7 @@ def test_describe( @mock.patch("snowflake.connector") def test_describe_fails_image_repository(mock_cursor, runner, snapshot): - result = runner.invoke(["object", "describe", "image_repository", "test_repo"]) + result = runner.invoke(["object", "describe", "image-repository", "test_repo"]) assert result.exit_code == 1, result.output assert result.output == snapshot