From b1a56249f506ca096935fca2b7b255ece0896193 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 13 Apr 2023 19:15:38 +0200 Subject: [PATCH 1/3] Add CI job to check that the test list is up to date --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b813da41..ffe02ead8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,6 +135,11 @@ jobs: # ensure our vendor directory matches up with our go modules run: | go mod vendor && git diff --exit-code || (echo "Unexpected change to vendor directory. Run 'go mod vendor' locally and commit the changes" && exit 1) + - name: Check Integration Test List + # ensure our integration test list is up to date + run: | + go generate pkg/integration/tests/tests.go && git diff --exit-code || (echo "Integration test list not up to date. Run 'go generate pkg/integration/tests/tests.go' locally and commit the changes" && exit 1) + shell: bash # needed so that we get "-o pipefail" lint: runs-on: ubuntu-latest env: From 3535cd0f94352588eb1e134b01232409006f9915 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 13 Apr 2023 19:12:47 +0200 Subject: [PATCH 2/3] Rename test files to match test names --- .../{basic_at_runtime.go => basic_cmd_at_runtime.go} | 0 .../{basic_from_config.go => basic_cmd_from_config.go} | 0 .../{basic_at_runtime_history.go => omit_from_history.go} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename pkg/integration/tests/custom_commands/{basic_at_runtime.go => basic_cmd_at_runtime.go} (100%) rename pkg/integration/tests/custom_commands/{basic_from_config.go => basic_cmd_from_config.go} (100%) rename pkg/integration/tests/custom_commands/{basic_at_runtime_history.go => omit_from_history.go} (100%) diff --git a/pkg/integration/tests/custom_commands/basic_at_runtime.go b/pkg/integration/tests/custom_commands/basic_cmd_at_runtime.go similarity index 100% rename from pkg/integration/tests/custom_commands/basic_at_runtime.go rename to pkg/integration/tests/custom_commands/basic_cmd_at_runtime.go diff --git a/pkg/integration/tests/custom_commands/basic_from_config.go b/pkg/integration/tests/custom_commands/basic_cmd_from_config.go similarity index 100% rename from pkg/integration/tests/custom_commands/basic_from_config.go rename to pkg/integration/tests/custom_commands/basic_cmd_from_config.go diff --git a/pkg/integration/tests/custom_commands/basic_at_runtime_history.go b/pkg/integration/tests/custom_commands/omit_from_history.go similarity index 100% rename from pkg/integration/tests/custom_commands/basic_at_runtime_history.go rename to pkg/integration/tests/custom_commands/omit_from_history.go From 6a340ec840711d8fc7ce6da4e2ca01a8873a168d Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 13 Apr 2023 19:13:03 +0200 Subject: [PATCH 3/3] Reorder tests --- pkg/integration/tests/test_list.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/integration/tests/test_list.go b/pkg/integration/tests/test_list.go index b44246abf..19f002bda 100644 --- a/pkg/integration/tests/test_list.go +++ b/pkg/integration/tests/test_list.go @@ -64,13 +64,13 @@ var tests = []*components.IntegrationTest{ conflicts.ResolveExternally, conflicts.ResolveMultipleFiles, conflicts.UndoChooseHunk, - custom_commands.BasicCmdFromConfig, custom_commands.BasicCmdAtRuntime, - custom_commands.OmitFromHistory, + custom_commands.BasicCmdFromConfig, custom_commands.FormPrompts, custom_commands.MenuFromCommand, custom_commands.MenuFromCommandsOutput, custom_commands.MultiplePrompts, + custom_commands.OmitFromHistory, diff.Diff, diff.DiffAndApplyPatch, diff.DiffCommits,