From 85a6a42bff05c38d0485ff40ce064145604c661b Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 10 Feb 2024 19:42:30 +0100 Subject: Extend submodule tests to use a submodule where name and path are different In most real-world scenarios, name and path are usually the same. They don't have to be though, and it's important to make sure we use the right one when passing arguments to git commands, so change the tests to have different name and path. --- pkg/integration/components/shell.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/integration/components/shell.go') diff --git a/pkg/integration/components/shell.go b/pkg/integration/components/shell.go index 48ff3fdf7..60c627918 100644 --- a/pkg/integration/components/shell.go +++ b/pkg/integration/components/shell.go @@ -345,9 +345,9 @@ func (self *Shell) CloneIntoRemote(name string) *Shell { return self } -func (self *Shell) CloneIntoSubmodule(submoduleName string) *Shell { +func (self *Shell) CloneIntoSubmodule(submoduleName string, submodulePath string) *Shell { self.Clone("other_repo") - self.RunCommand([]string{"git", "submodule", "add", "../other_repo", submoduleName}) + self.RunCommand([]string{"git", "submodule", "add", "--name", submoduleName, "../other_repo", submodulePath}) return self } -- cgit v1.2.3