From a885ee12c614df4540f610b662ef9490bca54c7c Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Mon, 9 Jan 2023 17:32:14 -0500 Subject: [PATCH] Add test for behaviour of scp-like non-github that incorrectly uses slash --- api/internal/git/repospec_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/internal/git/repospec_test.go b/api/internal/git/repospec_test.go index fb8ed0f75..6d8c6568c 100644 --- a/api/internal/git/repospec_test.go +++ b/api/internal/git/repospec_test.go @@ -229,6 +229,19 @@ func TestNewRepoSpecFromUrl_Smoke(t *testing.T) { GitSuffix: ".git", }, }, + { + name: "non-github_scp incorrectly using slash (invalid but currently passed through to git)", + input: "git@bitbucket.org/company/project.git//path?ref=branch", + cloneSpec: "git@bitbucket.org/company/project.git", + absPath: notCloned.Join("path"), + repoSpec: RepoSpec{ + Host: "git@bitbucket.org/", + RepoPath: "company/project", + KustRootPath: "/path", + Ref: "branch", + GitSuffix: ".git", + }, + }, { name: "non-github_git-user_ssh", input: "ssh://git@bitbucket.org/company/project.git//path?ref=branch",