summaryrefslogtreecommitdiffstats
path: root/pkg/integration
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2024-01-12 20:14:26 +1100
committerJesse Duffield <jessedduffield@gmail.com>2024-01-12 20:19:50 +1100
commita1ce6029c13ab69ae6e7d08a8f9593435abb5b92 (patch)
tree7a4887ba52df45f711f531ea7844cf4ba34f5f58 /pkg/integration
parent8c716184c15226b617ffb4831cef66f0b93779e7 (diff)
Pass -f as single arg in integration test
For some bizarre reason `pkg/integration/tests/filter_by_path/cli_arg.go` is failing as of 8c716184 like so: ``` test_lazygit Usage: test_lazygit [git-arg] Positional Variables: git-arg Panel to focus upon opening lazygit. Accepted values (based on git terminology): status, branch, log, stash. Ignored if --filter arg is passed. Flags: -h --help Displays help with available flag, subcommand, and positional value parameters. -p --path Path of git repo. (equivalent to --work-tree=<path> --git-dir=<path>/.git/) -f --filter Path to filter on in `git log -- <path>`. When in filter mode, the commits, reflog, and stash are filtered based on the given path, and some operations are restricted -v --version Print the current version -d --debug Run in debug mode with logging (see --logs flag below). Use the LOG_LEVEL env var to set the log level (debug/info/warn/error) (default: false) -l --logs Tail lazygit logs (intended to be used when `lazygit --debug` is called in a separate terminal tab) -c --config Print the default config -cd --print-config-dir Print the config directory -ucd --use-config-dir override default config directory with provided directory -w --work-tree equivalent of the --work-tree git argument -g --git-dir equivalent of the --git-dir git argument -ucf --use-config-file Comma separated list to custom config file(s) Unknown arguments supplied: filterFile ``` where the CLI args are: ``` ([]string) (len=5 cap=5) { (string) (len=25) "/tmp/lazygit/test_lazygit", (string) (len=6) "-debug", (string) (len=108) "--use-config-dir=/Users/jesseduffieldduffield/repos/lazygit/test/_results/filter_by_path/cli_arg/used_config", (string) (len=2) "-f", (string) (len=10) "filterFile" } ``` This appears to be a bug in flaggy itself. I've updated to the latest version but it still breaks. Bizarrely it works fine on CI and only fails locally. Running lazygit locally with `lg -f pkg/gui/controllers/helpers/refresh_helper.go` it works fine. So I don't know what's going on there. At any rate, I'm just going to get the test passing by passing `-f=filterFile` as a single argument.
Diffstat (limited to 'pkg/integration')
-rw-r--r--pkg/integration/tests/filter_by_path/cli_arg.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/integration/tests/filter_by_path/cli_arg.go b/pkg/integration/tests/filter_by_path/cli_arg.go
index de368c17d..5b3912829 100644
--- a/pkg/integration/tests/filter_by_path/cli_arg.go
+++ b/pkg/integration/tests/filter_by_path/cli_arg.go
@@ -7,7 +7,7 @@ import (
var CliArg = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Filter commits by file path, using CLI arg",
- ExtraCmdArgs: []string{"-f", "filterFile"},
+ ExtraCmdArgs: []string{"-f=filterFile"},
Skip: false,
SetupConfig: func(config *config.AppConfig) {
},