-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add some tests for GitDsc #87
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
o.O They ran locally for me. . . Time to debug! |
You might need to rearrange the order so that the helper functions are first before the Assert-Git |
I think the issue is actually that Git just isn't installed, so there is no way for it to actually clone the repository.
Edit: Just realized that option 2 won't work, since that also requires |
Okay, that was harder than I thought it would be, since Pester doesn't like to play nice if you don't have the scopes set juuuuuust right, but I think I got it to work |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one fix and the rest looks good
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Okay, now I'm truly lost. This is the error on line 22 -
But yet the module is imported on line 19 in the Edit: When the module is imported, it calls |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Why do I even try. I uninstalled Git, and the tests passed for me. I tried it in a VM, and the tests passed for me. I have no clue what's going wrong. I'll revisit this later once I have a bit more time |
I noticed that the
GitConfigFile
resource in theGitDsc
module didn't actually exist. So, I removed it and added the test for listing the available resources. I also added a basic test for theGitClone
resource. I wasn't familiar enough with the other resources in the module to add tests for them, but I figured that some tests were better than none. If this PR merges, I'll raise an issue for tracking that the additional tests should be added