From c465b0f2ff7af9bbf9a615065e95f5e4907006cb Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 12 Sep 2023 11:52:25 +0200 Subject: [PATCH] Rename test/results to test/_results This prevents commands like "go test ./..." from looking into it, and it prevents VS Code's Problems panel from showing errors about the go files in that folder. --- .gitignore | 2 +- pkg/integration/README.md | 2 +- pkg/integration/clients/tui.go | 2 +- pkg/integration/components/paths.go | 4 ++-- pkg/integration/components/runner.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 40449fada..fad3a96f8 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,7 @@ lazygit.exe test/git_server/data -test/results/** +test/_results/** oryxBuildBinary __debug_bin diff --git a/pkg/integration/README.md b/pkg/integration/README.md index 1e0562509..44b9459d1 100644 --- a/pkg/integration/README.md +++ b/pkg/integration/README.md @@ -50,7 +50,7 @@ The name of a test is based on its path, so the name of the test at `pkg/integra You can pass the INPUT_DELAY env var to the test runner in order to set a delay in milliseconds between keypresses or mouse clicks, which helps for watching a test at a realistic speed to understand what it's doing. Or you can pass the '--slow' flag which sets a pre-set 'slow' key delay. In the tui you can press 't' to run the test in slow mode. -The resultant repo will be stored in `test/results`, so if you're not sure what went wrong you can go there and inspect the repo. +The resultant repo will be stored in `test/_results`, so if you're not sure what went wrong you can go there and inspect the repo. ### Running tests in VSCode diff --git a/pkg/integration/clients/tui.go b/pkg/integration/clients/tui.go index 8036b118b..64610ccb3 100644 --- a/pkg/integration/clients/tui.go +++ b/pkg/integration/clients/tui.go @@ -153,7 +153,7 @@ func RunTUI() { return nil } - cmd := exec.Command("sh", "-c", fmt.Sprintf("code test/results/%s", currentTest.Name())) + cmd := exec.Command("sh", "-c", fmt.Sprintf("code test/_results/%s", currentTest.Name())) if err := cmd.Run(); err != nil { return err } diff --git a/pkg/integration/components/paths.go b/pkg/integration/components/paths.go index d100e91fe..b8b129d2c 100644 --- a/pkg/integration/components/paths.go +++ b/pkg/integration/components/paths.go @@ -3,9 +3,9 @@ package components import "path/filepath" // convenience struct for easily getting directories within our test directory. -// We have one test directory for each test, found in test/results. +// We have one test directory for each test, found in test/_results. type Paths struct { - // e.g. test/results/test_name + // e.g. test/_results/test_name root string } diff --git a/pkg/integration/components/runner.go b/pkg/integration/components/runner.go index 339a7114e..4a9d624ad 100644 --- a/pkg/integration/components/runner.go +++ b/pkg/integration/components/runner.go @@ -39,7 +39,7 @@ func RunTests( return err } - testDir := filepath.Join(projectRootDir, "test", "results") + testDir := filepath.Join(projectRootDir, "test", "_results") if err := buildLazygit(); err != nil { return err