Add integration tests for dvc import-url#10770
Closed
1Utkarsh1 wants to merge 2 commits intotreeverse:mainfrom
Closed
Add integration tests for dvc import-url#107701Utkarsh1 wants to merge 2 commits intotreeverse:mainfrom
dvc import-url#107701Utkarsh1 wants to merge 2 commits intotreeverse:mainfrom
Conversation
This commit introduces a new test file `tests/func/test_import_url_integration.py` to validate the `dvc import-url` command with various remote storage types. The tests cover: - HTTP: Using a local HTTP server to serve a data file. - AWS S3: Using `moto` to mock an S3 bucket. - Google Cloud Storage (GCS): Using `testcontainers` with a GCS emulator. - Azure Blob Storage: Using `testcontainers` with the Azurite emulator. Each test verifies that `dvc import-url` successfully imports a file from the respective remote, creates the corresponding .dvc file, and that the content of the imported file matches the source. Fixtures are used to set up and tear down the necessary services and resources for each test.
for more information, see https://pre-commit.ci
Collaborator
|
@1Utkarsh1, could you share more about the motivation of this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces a new test file
tests/func/test_import_url_integration.pyto validate thedvc import-urlcommand with various remote storage types.The tests cover:
mototo mock an S3 bucket.testcontainerswith a GCS emulator.testcontainerswith the Azurite emulator.Each test verifies that
dvc import-urlsuccessfully imports a file from the respective remote, creates the corresponding .dvc file, and that the content of the imported file matches the source. Fixtures are used to set up and tear down the necessary services and resources for each test.❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏