run integration tests with various git versions
- PR Description
https://github.com/jesseduffield/lazygit/issues/2456
although not in Docker
- Please check if the PR fulfills these requirements
- [x] Cheatsheets are up-to-date (run
go run scripts/cheatsheet/main.go generate) - [x] Code has been formatted (see here)
- [x] Tests have been added/updated (see here for the integration test guide)
- [x] Text is internationalised (see here)
- [x] Docs (specifically
docs/Config.md) have been updated if necessary - [ ] You've read through your own file changes for silly mistakes etc
Uffizzi Ephemeral Environment deployment-16733
:cloud: https://app.uffizzi.com/github.com/jesseduffield/lazygit/pull/2459
:page_facing_up: View Application Logs etc.
What is Uffizzi? Learn more!
Nice work @Ryooooooga . My main hesitation here is that if a given git version fails, it might not be obvious why, and it would be good to fix it locally. If we were to use pre-built docker containers on CI, we could use the same image to be guaranteed to reproduce the issue locally. If we don't use docker, then we'll still need some way to go about reproducing locally (we could avoid docker on CI but then have some dockerfiles in the repo for local use, for example).
What are your thoughts?
@jesseduffield I created a Docker image for local integration_test: https://github.com/Ryooooooga/lazygit/pull/4
The test apply_in_reverse_with_conflict.go fails in git versions 2.30.8 and earlier. Apparently the output Applied patch to 'file2' cleanly was only added more recently. Since it is not essential that we check this output, this patch should fix it:
diff --git a/pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go b/pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go
index 04d160a0..ebb84fbf 100644
--- a/pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go
+++ b/pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go
@@ -51,8 +51,7 @@ var ApplyInReverseWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
t.ExpectPopup().Alert().
Title(Equals("Error")).
- Content(Contains("Applied patch to 'file1' with conflicts.").
- Contains("Applied patch to 'file2' cleanly.")).
+ Content(Contains("Applied patch to 'file1' with conflicts.")).
Confirm()
t.Views().Files().
@Ryooooooga Do you have time to pick this up again?
We found another regression with an older git version (#2745), and this PR would have caught it. It would be so cool to have this on master.
Let me know if you don't have time, I would consider taking it on in that case.
Since I didn't hear back, I went ahead and made my own version of this: #2754. It uses a very similar approach as this PR, but it's also different enough that it's worth re-reviewing thoroughly.
https://github.com/jesseduffield/lazygit/pull/2754 is approved so I'll close this off. But thanks for laying the groundwork @Ryooooooga !