From 7569180cacf0410ed69ea9c28051c9c168245540 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Mon, 17 Jul 2023 17:13:56 +1000 Subject: [PATCH] Fix tests We now change directories to the repo on startup so we don't need to determine the test path in some special way --- pkg/integration/components/test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/integration/components/test.go b/pkg/integration/components/test.go index d17e3f7c5..ca73ba805 100644 --- a/pkg/integration/components/test.go +++ b/pkg/integration/components/test.go @@ -8,7 +8,6 @@ import ( "github.com/jesseduffield/generics/slices" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/config" - "github.com/jesseduffield/lazygit/pkg/env" integrationTypes "github.com/jesseduffield/lazygit/pkg/integration/types" "github.com/jesseduffield/lazygit/pkg/utils" ) @@ -170,11 +169,12 @@ func (self *IntegrationTest) SetupRepo(shell *Shell) { } func (self *IntegrationTest) Run(gui integrationTypes.GuiDriver) { - // we pass the --pass arg to lazygit when running an integration test, and that - // ends up stored in the following env var - repoPath := env.GetGitWorkTreeEnv() + pwd, err := os.Getwd() + if err != nil { + panic(err) + } - shell := NewShell(repoPath, func(errorMsg string) { gui.Fail(errorMsg) }) + shell := NewShell(pwd, func(errorMsg string) { gui.Fail(errorMsg) }) keys := gui.Keys() testDriver := NewTestDriver(gui, shell, keys, KeyPressDelay())