Sets up the fixture for test and returns the working directory to invoke lazygit in.
(test *IntegrationTest, paths Paths, rootDir string)
| 151 | // Sets up the fixture for test and returns the working directory to invoke |
| 152 | // lazygit in. |
| 153 | func createFixture(test *IntegrationTest, paths Paths, rootDir string) string { |
| 154 | env := NewTestEnvironment(rootDir) |
| 155 | |
| 156 | env = append(env, fmt.Sprintf("%s=%s", PWD, paths.ActualRepo())) |
| 157 | shell := NewShell( |
| 158 | paths.ActualRepo(), |
| 159 | env, |
| 160 | func(errorMsg string) { panic(errorMsg) }, |
| 161 | ) |
| 162 | shell.Init() |
| 163 | |
| 164 | test.SetupRepo(shell) |
| 165 | |
| 166 | return shell.dir |
| 167 | } |
| 168 | |
| 169 | func testPath(rootdir string) string { |
| 170 | return filepath.Join(rootdir, "test") |
no test coverage detected