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

Add tests for git functions #137

Merged
merged 10 commits into from
Jul 30, 2021
Merged

Add tests for git functions #137

merged 10 commits into from
Jul 30, 2021

Conversation

zkamvar
Copy link
Contributor

@zkamvar zkamvar commented Jul 30, 2021

This pull request adds tests for git tests by incorporating a new test fixture that creates a remote repository to push and pull to within the system.

With this method, I can mock the behaviour of the ci_* and worktree_* functions and check that their outputs continue to make sense.

Tasks left to do:

  • add catch for git presence
    - [ ] add option to handle output from git() operations (currently very noisy)
    - [ ] incorporate more unit tests for ci_* operations
    - [ ] add test for archive generation

edit: I don't want this PR to get too hairy, so I'm going to limit myself on tests for the moment.

Right now, the tests for ci_deploy() work and do bring up the test coverage to nearly 90% (which is a whole lot better than the ~80% we were hovering around). I won't be able to get to this until ten days from now, so I want to make sure I'm at a good stopping point.

I now have a test fixture that sets up a local remote repository for me
to "push" to and "pull" from so that I can test how the ci_ functions
behave.
@zkamvar zkamvar marked this pull request as draft July 30, 2021 18:29
I've decided to move the test fixture generation inside the package
because they are useful for live debugging.
@zkamvar zkamvar marked this pull request as ready for review July 30, 2021 22:32
@zkamvar zkamvar merged commit 3a8e005 into main Jul 30, 2021
@zkamvar zkamvar deleted the update-deployments branch July 30, 2021 22:49
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.

None yet

1 participant