Skip to content

chore: refactor git and git library unit tests #688

@kirederik

Description

@kirederik

Context

We recently moved away from go-git in favour of the git cli. In the process, we changed significantly how the git writer operates. The existing unit tests are testing both the git library we extended and the git writer itself. We should, instead, mock the git library and unit test the writer in isolation.

The git writer tests also indirectly test functionality in the git library package (see SetAuth). This should be tested in the git library package.

Tasks

  • Update git writer unit test with a mock of the git writer
  • Update tests to exercise different error cases of the git writer
  • Migrate library tests into the library package (currently it's in utils/git; consider renaming this package)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions