Skip to content

Introduce gittest.Exec|ExecStream to execute git commands

Pavlo Strokov requested to merge ps-git-command into master

The function testhelper.MustRunCommand designed for running commands in the shell with reporting back result of the execution. It servers too many purposes and behaves differently in case 'git' command needs to be run. It uses a globally defined variable config.Config to get path to the git binary. Most of the tests now don't rely on that global variable and use one created locally for each test. In order to run only git related commands with locally defined configuration the new gittest.Exec and ExecStream functions were added. A couple of helper functions were changed to rely on those new functions to demonstrate their usage.

Part of: #2699 (closed)

Edited by Pavlo Strokov

Merge request reports

Loading