Skip to content

Conversation

nover
Copy link
Contributor

@nover nover commented May 25, 2020

This PR will

  • refactor IVcs provider to allow passing in a working directory
  • update GitVcs to use passed working directory
  • add covering test suite of GitVcs

Closes #57

@nover nover self-assigned this May 25, 2020
@nover nover changed the title 57 find a way to consistently test the git vcs provider Add test suite for the git vcs provider May 25, 2020
@nover nover force-pushed the 57-find-a-way-to-consistently-test-the-git-vcs-provider branch 2 times, most recently from 5d447c6 to ce9c90c Compare May 3, 2021 17:53
@nover nover force-pushed the 57-find-a-way-to-consistently-test-the-git-vcs-provider branch from ce9c90c to 0dda984 Compare May 14, 2021 17:03
@nover nover requested a review from pingvinen May 14, 2021 17:05
@nover
Copy link
Contributor Author

nover commented May 14, 2021

The commit tests are working locally, they are probably failing in CI due to missing author info

@nover nover force-pushed the 57-find-a-way-to-consistently-test-the-git-vcs-provider branch 2 times, most recently from 071d805 to 4fc6c6b Compare May 14, 2021 17:18
}

[Fact]
public void DetectingGitOnMachineWorks()
Copy link
Contributor

Choose a reason for hiding this comment

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

question: can we make a negative test for this as well?

I am not sure how to go about it, but currently the implementation could just be return true and the test would pass :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess we could but I'm not sure how easily that is done - I do agree with your comment though.

running it on a machine without git in CI will not work, as it won't be able to get the source code - but perhaps altering the path for the process info we use to launch the tool will work.

}

[Fact]
public void IsRepositoryCleanWorks()
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: add test with dirty state as well

@nover nover force-pushed the 57-find-a-way-to-consistently-test-the-git-vcs-provider branch from 4fc6c6b to 6264b57 Compare April 16, 2024 09:56
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.

Find a way to consistently test the git vcs provider
2 participants