Skip to content

Commit

Permalink
SNOW-1011764: Test and comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-davwang committed Jan 31, 2024
1 parent 74e028e commit 342768d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/snowflake/cli/plugins/object/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')}"


Expand Down
2 changes: 1 addition & 1 deletion src/snowflake/cli/plugins/object/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/object/__snapshots__/test_object.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -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
╰──────────────────────────────────────────────────────────────────────────────╯

'''
Expand Down
2 changes: 1 addition & 1 deletion tests/object/test_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 342768d

Please sign in to comment.