diff --git a/core/server/api_container/server/startosis_engine/startosis_packages/git_package_content_provider/git_package_content_provider_test.go b/core/server/api_container/server/startosis_engine/startosis_packages/git_package_content_provider/git_package_content_provider_test.go index a5ac4cceca..98e3470ede 100644 --- a/core/server/api_container/server/startosis_engine/startosis_packages/git_package_content_provider/git_package_content_provider_test.go +++ b/core/server/api_container/server/startosis_engine/startosis_packages/git_package_content_provider/git_package_content_provider_test.go @@ -600,6 +600,17 @@ func TestGetAbsoluteLocator_AbsoluteLocatorIsInRootPackageButSourceIsNotShouldNo require.Nil(t, err) } +func TestGetAbsoluteLocator_RepositoriesWithSamePrefixNameShouldNotBeBlocked(t *testing.T) { + provider := NewGitPackageContentProvider("", "", NewGitHubPackageAuthProvider(""), nil) + + packageId := "github.com/package" + locatorOfModuleInWhichThisBuiltInIsBeingCalled := "github.com/package-2/main.star" + maybeRelativeLocator := "github.com/package/file.star" + + _, err := provider.GetAbsoluteLocator(packageId, locatorOfModuleInWhichThisBuiltInIsBeingCalled, maybeRelativeLocator, noPackageReplaceOptions) + require.Nil(t, err) +} + func Test_isSamePackageLocalAbsoluteLocator_TestDetectionInSubpath(t *testing.T) { result := shouldBlockAbsoluteLocatorBecauseIsInTheSameSourceModuleLocatorPackage("github.com/author/package/bang/lib.star", "github.com/author/package/main.star", "github.com/author/package/") require.True(t, result)