summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-07-01 17:44:14 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-07-10 15:09:17 +0200
commit62ab41c310124e5df210a4a4460b356ab6d0f73b (patch)
tree50e2cecc41681ce9edfb8491c47c2e00bda85c04
parent85f7aa9d7bef5f3a82be38e1decf345049aa7bb6 (diff)
Fix pull rebase tests
It seems that older git versions would drop empty commits when rebasing. Since this aspect is not relevant to what we're testing here, fix this by simply avoiding empty commits in these tests.
-rw-r--r--pkg/integration/tests/sync/pull_rebase.go6
-rw-r--r--pkg/integration/tests/sync/pull_rebase_interactive_conflict.go6
-rw-r--r--pkg/integration/tests/sync/pull_rebase_interactive_conflict_drop.go6
3 files changed, 12 insertions, 6 deletions
diff --git a/pkg/integration/tests/sync/pull_rebase.go b/pkg/integration/tests/sync/pull_rebase.go
index 41ca82436..77810426e 100644
--- a/pkg/integration/tests/sync/pull_rebase.go
+++ b/pkg/integration/tests/sync/pull_rebase.go
@@ -15,14 +15,16 @@ var PullRebase = NewIntegrationTest(NewIntegrationTestArgs{
shell.Commit("one")
shell.UpdateFileAndAdd("file", "content2")
shell.Commit("two")
- shell.EmptyCommit("three")
+ shell.CreateFileAndAdd("file3", "content3")
+ shell.Commit("three")
shell.CloneIntoRemote("origin")
shell.SetBranchUpstream("master", "origin/master")
shell.HardReset("HEAD^^")
- shell.EmptyCommit("four")
+ shell.CreateFileAndAdd("file4", "content4")
+ shell.Commit("four")
shell.SetConfig("pull.rebase", "true")
},
diff --git a/pkg/integration/tests/sync/pull_rebase_interactive_conflict.go b/pkg/integration/tests/sync/pull_rebase_interactive_conflict.go
index 9e66f3bcd..a6a3f5356 100644
--- a/pkg/integration/tests/sync/pull_rebase_interactive_conflict.go
+++ b/pkg/integration/tests/sync/pull_rebase_interactive_conflict.go
@@ -15,7 +15,8 @@ var PullRebaseInteractiveConflict = NewIntegrationTest(NewIntegrationTestArgs{
shell.Commit("one")
shell.UpdateFileAndAdd("file", "content2")
shell.Commit("two")
- shell.EmptyCommit("three")
+ shell.CreateFileAndAdd("file3", "content3")
+ shell.Commit("three")
shell.CloneIntoRemote("origin")
@@ -24,7 +25,8 @@ var PullRebaseInteractiveConflict = NewIntegrationTest(NewIntegrationTestArgs{
shell.HardReset("HEAD^^")
shell.UpdateFileAndAdd("file", "content4")
shell.Commit("four")
- shell.EmptyCommit("five")
+ shell.CreateFileAndAdd("file5", "content5")
+ shell.Commit("five")
shell.SetConfig("pull.rebase", "interactive")
},
diff --git a/pkg/integration/tests/sync/pull_rebase_interactive_conflict_drop.go b/pkg/integration/tests/sync/pull_rebase_interactive_conflict_drop.go
index 9ca3a0ebe..b53790964 100644
--- a/pkg/integration/tests/sync/pull_rebase_interactive_conflict_drop.go
+++ b/pkg/integration/tests/sync/pull_rebase_interactive_conflict_drop.go
@@ -15,7 +15,8 @@ var PullRebaseInteractiveConflictDrop = NewIntegrationTest(NewIntegrationTestArg
shell.Commit("one")
shell.UpdateFileAndAdd("file", "content2")
shell.Commit("two")
- shell.EmptyCommit("three")
+ shell.CreateFileAndAdd("file3", "content3")
+ shell.Commit("three")
shell.CloneIntoRemote("origin")
@@ -24,7 +25,8 @@ var PullRebaseInteractiveConflictDrop = NewIntegrationTest(NewIntegrationTestArg
shell.HardReset("HEAD^^")
shell.UpdateFileAndAdd("file", "content4")
shell.Commit("four")
- shell.EmptyCommit("five")
+ shell.CreateFileAndAdd("fil5", "content5")
+ shell.Commit("five")
shell.SetConfig("pull.rebase", "interactive")
},