1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-24 06:42:03 +03:00

much cleaner integration test code

This commit is contained in:
Jesse Duffield
2021-04-06 09:02:01 +10:00
parent 28ffaf9348
commit 440eb387d7
5 changed files with 215 additions and 225 deletions

View File

@ -13,6 +13,8 @@ import (
"github.com/jesseduffield/lazygit/pkg/secureexec"
)
// this program lets you manage integration tests in a TUI.
type App struct {
tests []*integration.Test
itemIdx int
@ -98,7 +100,7 @@ func main() {
return nil
}
cmd := secureexec.Command("sh", "-c", fmt.Sprintf("RECORD_EVENTS=true go run integration/main.go %s", currentTest.Name))
cmd := secureexec.Command("sh", "-c", fmt.Sprintf("RECORD_EVENTS=true go run test/runner/main.go %s", currentTest.Name))
app.runSubprocess(cmd)
return nil
@ -112,7 +114,7 @@ func main() {
return nil
}
cmd := secureexec.Command("sh", "-c", fmt.Sprintf("go run integration/main.go %s", currentTest.Name))
cmd := secureexec.Command("sh", "-c", fmt.Sprintf("go run test/runner/main.go %s", currentTest.Name))
app.runSubprocess(cmd)
return nil
@ -126,7 +128,7 @@ func main() {
return nil
}
cmd := secureexec.Command("sh", "-c", fmt.Sprintf("UPDATE_SNAPSHOTS=true go run integration/main.go %s", currentTest.Name))
cmd := secureexec.Command("sh", "-c", fmt.Sprintf("UPDATE_SNAPSHOTS=true go run test/runner/main.go %s", currentTest.Name))
app.runSubprocess(cmd)
return nil