Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pczajka committed Mar 13, 2024
1 parent dac1b34 commit 4d39a18
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/git/test_git_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ def test_toplevel_help(runner):
assert result.exit_code == 0, result.output


def test_not_visible_if_disabled(runner, monkeypatch):
monkeypatch.setenv("SNOWFLAKE_CLI_FEATURES_ENABLE_SNOWGIT", False)
result = runner.invoke(["--help"])
assert (
result.exit_code == 0
and "Manages git repositories in Snowflake." not in result.output
)
result = runner.invoke(["git", "--help"])
assert result.exit_code == 2 and "No such command 'git'" in result.output


@mock.patch("snowflake.connector.connect")
def test_list_branches(mock_connector, runner, mock_ctx):
ctx = mock_ctx()
Expand Down

0 comments on commit 4d39a18

Please sign in to comment.