From 4c7d363959287031453354f547a97a2658208c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Marku=C5=A1i=C4=87?= Date: Sat, 10 Sep 2022 17:00:19 +0200 Subject: [PATCH] Add CheckoutBranch and Merge helpers for integration tests --- pkg/integration/components/shell.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/integration/components/shell.go b/pkg/integration/components/shell.go index 458528be7..6595b1e87 100644 --- a/pkg/integration/components/shell.go +++ b/pkg/integration/components/shell.go @@ -63,6 +63,10 @@ func (s *Shell) Checkout(name string) *Shell { return s.RunCommand("git checkout " + name) } +func (s *Shell) Merge(name string) *Shell { + return s.RunCommand("git merge --commit " + name) +} + func (s *Shell) GitAdd(path string) *Shell { return s.RunCommand(fmt.Sprintf("git add \"%s\"", path)) }