Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snow 1105629 git integration tests #865

Merged
merged 34 commits into from
Mar 7, 2024

Conversation

sfc-gh-pczajka
Copy link
Contributor

@sfc-gh-pczajka sfc-gh-pczajka commented Mar 4, 2024

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

Add integration tests for:

  • snow object git-repository *
  • snow git fetch
  • snow git list-branches and list-tags
  • snow git list-files
  • snow git copy

@sfc-gh-pczajka sfc-gh-pczajka force-pushed the SNOW-1105629-git-integration-tests branch from 81ccc92 to 712b07b Compare March 4, 2024 14:51
tests/git/test_git_commands.py Outdated Show resolved Hide resolved
tests_integration/test_git.py Outdated Show resolved Hide resolved
tests_integration/test_git.py Outdated Show resolved Hide resolved
tests_integration/test_git.py Outdated Show resolved Hide resolved
tests_integration/test_git.py Outdated Show resolved Hide resolved
tests_integration/test_git.py Outdated Show resolved Hide resolved
tests_integration/test_git.py Outdated Show resolved Hide resolved
tests_integration/test_git.py Outdated Show resolved Hide resolved
Comment on lines +81 to +85
result = runner.invoke_with_connection_json(
["git", "list-branches", sf_git_repository]
)
assert result.exit_code == 0
assert "main" in _filter_key(result.json, key="name")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HAve you considered using like to reduce the json and do explicit comparison ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

["object", "stage", "list", STAGE_NAME]
)
assert result.exit_code == 0
print([f["name"] for f in result.json])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug statement

@sfc-gh-pczajka sfc-gh-pczajka merged commit 223eda5 into git-repository Mar 7, 2024
17 checks passed
@sfc-gh-pczajka sfc-gh-pczajka deleted the SNOW-1105629-git-integration-tests branch March 7, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants