summaryrefslogtreecommitdiffstats
path: root/pkg/integration/components/shell.go
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-02-10 19:42:30 +0100
committerStefan Haller <stefan@haller-berlin.de>2024-03-07 20:16:28 +0100
commit85a6a42bff05c38d0485ff40ce064145604c661b (patch)
treecb2f4103b99d6b45246ec5726159ba04deca7e15 /pkg/integration/components/shell.go
parentad017459d2d3475c18182c6629b6e282c5c558cb (diff)
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.
Diffstat (limited to 'pkg/integration/components/shell.go')
-rw-r--r--pkg/integration/components/shell.go4
1 files changed, 2 insertions, 2 deletions
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
}