Add unit tests for git-p4.

Review Request #12649 — Created Sept. 27, 2022 and submitted — Latest diff uploaded

Information

RBTools
release-4.x

Reviewers

The git-p4 support in GitClient lacked any real testing, which meant
it regressed with Python 3. This also made it harder to iterate on. We
had some fantastic work in recent contributions to extend the features
of git-p4 diffs, but we couldn't reasonably ask for any unit tests to be
written to prove the support works.

This change introduces unit tests that cover get_repository_info() and
diff() for git-p4. It avoids duplicating a lot of the core diff tests,
but does cover all the Perforce-specific operations and multi-commit
review requests.

There's also a bit of cleanup to related tests in this file, to keep
naming consistent.

This is a precursor to work for optimizing and future-proofing this
code.

Unit tests pass.

Commits

Files

    Loading...