diff --git a/docs/Integration_Tests.md b/docs/Integration_Tests.md index bbc2ebe9f..fab7bb984 100644 --- a/docs/Integration_Tests.md +++ b/docs/Integration_Tests.md @@ -1 +1 @@ -see pkg/integration/README.md +see new docs [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) diff --git a/pkg/integration/integration.go b/pkg/integration/integration.go index cb2b79861..b479614c9 100644 --- a/pkg/integration/integration.go +++ b/pkg/integration/integration.go @@ -42,7 +42,7 @@ type ( logf func(format string, formatArgs ...interface{}) ) -func RunTestsNew( +func RunTests( logf logf, runCmd func(cmd *exec.Cmd) error, fnWrapper func(test *helpers.Test, f func() error), @@ -82,14 +82,14 @@ func RunTestsNew( findOrCreateDir(testPath) prepareIntegrationTestDir(actualDir) findOrCreateDir(actualRepoDir) - err := createFixtureNew(test, actualRepoDir, rootDir) + err := createFixture(test, actualRepoDir, rootDir) if err != nil { return err } configDir := filepath.Join(testPath, "used_config") - cmd, err := getLazygitCommandNew(test, testPath, rootDir) + cmd, err := getLazygitCommand(test, testPath, rootDir) if err != nil { return err } @@ -229,7 +229,7 @@ func compareSnapshots(logf logf, configDir string, actualDir string, expectedDir return nil } -func createFixtureNew(test *helpers.Test, actualDir string, rootDir string) error { +func createFixture(test *helpers.Test, actualDir string, rootDir string) error { if err := os.Chdir(actualDir); err != nil { panic(err) } @@ -249,7 +249,7 @@ func createFixtureNew(test *helpers.Test, actualDir string, rootDir string) erro return nil } -func getLazygitCommandNew(test *helpers.Test, testPath string, rootDir string) (*exec.Cmd, error) { +func getLazygitCommand(test *helpers.Test, testPath string, rootDir string) (*exec.Cmd, error) { osCommand := oscommands.NewDummyOSCommand() templateConfigDir := filepath.Join(rootDir, "test", "default_test_config") diff --git a/pkg/integration/integration_test.go b/pkg/integration/integration_test.go index 3e9da8fe9..98001ac55 100644 --- a/pkg/integration/integration_test.go +++ b/pkg/integration/integration_test.go @@ -31,7 +31,7 @@ func TestIntegration(t *testing.T) { parallelIndex := tryConvert(os.Getenv("PARALLEL_INDEX"), 0) testNumber := 0 - err := RunTestsNew( + err := RunTests( t.Logf, runCmdHeadless, func(test *helpers.Test, f func() error) { diff --git a/pkg/integration/runner/main.go b/pkg/integration/runner/main.go index ed30c63b8..739474f96 100644 --- a/pkg/integration/runner/main.go +++ b/pkg/integration/runner/main.go @@ -39,7 +39,7 @@ func main() { return test.Name() }) - err := integration.RunTestsNew( + err := integration.RunTests( log.Printf, runCmdInTerminal, func(test *helpers.Test, f func() error) {