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

test: pkg: add func test #1772

Closed
dmpetrov opened this issue Mar 22, 2019 · 1 comment · Fixed by #2149
Closed

test: pkg: add func test #1772

dmpetrov opened this issue Mar 22, 2019 · 1 comment · Fixed by #2149
Assignees
Labels
feature request Requesting a new feature p1-important Important, aka current backlog of things to do

Comments

@dmpetrov
Copy link
Member

Only very basic tests were developed for pkg install. However, a fixture framework was already redesigned to cover pkg install needs - which might use multiple repositories in a single test (the old test fixtures allows only a single repo).

Test cases:

  • cannot copy repository (it is missing, access issues)
  • cannot pull data (access issues, not enough space on hdd)
  • what if an installed file overwrites an existing one.
  • dvc_mod dir exist\not
    And many others.

Today the test coverage in pkg files only:

dvc/repo/pkg.py                   96     20    79%
dvc/command/pkg.py                26      6    77%
dvc/temp_git_repo.py              91     13    86%

It needs to be at least 95%.

Note, this command designed to be atomic. If some issue happens during clone or pull then the old version of the package (in dvc_mod/mypackage dir) shouldn't be removed. See special class TempGitRepo.

@dmpetrov dmpetrov added the feature request Requesting a new feature label Mar 22, 2019
@efiop efiop added the p3-nice-to-have It should be done this or next sprint label Mar 22, 2019
@efiop efiop changed the title Unit tests for pkg test: pkg: add func test Mar 22, 2019
@efiop efiop self-assigned this May 28, 2019
@efiop efiop added p1-important Important, aka current backlog of things to do and removed p3-nice-to-have It should be done this or next sprint labels May 28, 2019
@efiop
Copy link
Contributor

efiop commented Jun 17, 2019

Partially fixed by #2012

@efiop efiop closed this as completed Jun 17, 2019
@efiop efiop reopened this Jun 17, 2019
efiop added a commit to efiop/dvc that referenced this issue Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requesting a new feature p1-important Important, aka current backlog of things to do
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants