Skip to content

Commit

Permalink
remove snapshots for Windows run
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pczajka committed Mar 4, 2024
1 parent b1d001e commit 81ccc92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 23 deletions.
19 changes: 0 additions & 19 deletions tests_integration/__snapshots__/test_git.ambr

This file was deleted.

16 changes: 12 additions & 4 deletions tests_integration/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ def test_list_branches_and_tags(runner, git_repository):


@pytest.mark.integration
def test_list_files(runner, git_repository, snapshot):
def test_list_files(runner, git_repository):
# error messages
result = runner.invoke_with_connection(["git", "list-files", git_repository])
assert result.output == snapshot
_assert_error_message_in_output(result.output)

try:
repository_path = f"@{git_repository}"
Expand Down Expand Up @@ -170,7 +170,7 @@ def test_list_files(runner, git_repository, snapshot):


@pytest.mark.integration
def test_copy(runner, git_repository, snapshot):
def test_copy(runner, git_repository):
# create stage for testing copy
STAGE_NAME = "a_perfect_stage_for_testing"
result = runner.invoke_with_connection(["sql", "-q", f"create stage {STAGE_NAME}"])
Expand All @@ -180,7 +180,7 @@ def test_copy(runner, git_repository, snapshot):
result = runner.invoke_with_connection(
["git", "copy", git_repository, f"@{STAGE_NAME}"]
)
assert result.output == snapshot
_assert_error_message_in_output(result.output)
try:
repository_path = f"@{git_repository}"
runner.invoke_with_connection(
Expand Down Expand Up @@ -254,6 +254,14 @@ def _filter_key(objects, *, key):
return [o[key] for o in objects]


def _assert_error_message_in_output(output):
assert "Error" in output
assert (
"REPOSITORY_PATH should be a path to git repository stage with scope" in output
)
assert "provided. For example: @my_repo/branches/main" in output


def _integration_exists(runner, integration_name):
result = runner.invoke_with_connection_json(["sql", "-q", "SHOW INTEGRATIONS"])
assert result.exit_code == 0
Expand Down

0 comments on commit 81ccc92

Please sign in to comment.