Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Dec 4, 2024
1 parent c1fdd37 commit c4c3619
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,16 @@ func Test_isNotSamePackageLocalAbsoluteLocator_TestImportPackageWithSamePrefixNa
require.False(t, result)
}

func Test_isNotSamePackageLocalAbsoluteLocator_TestImportSubPackageWithSamePrefixNameAsRootPackages(t *testing.T) {
// Without root package id trailing slash.
result := shouldBlockAbsoluteLocatorBecauseIsInTheSameSourceModuleLocatorPackage("github.com/author/package/package2/main.star", "github.com/author/package/main.star", "github.com/author/package")
require.False(t, result)

// With root package id trailing slash.
result = shouldBlockAbsoluteLocatorBecauseIsInTheSameSourceModuleLocatorPackage("github.com/author/package/package2/main.star", "github.com/author/package/main.star", "github.com/author/package/")
require.False(t, result)
}

func Test_getPathToPackageRoot(t *testing.T) {
githubUrlWithKurtosisPackageInSubfolder := "github.com/sample/sample-package/folder/subpackage"
parsedGitUrl, err := shared_utils.ParseGitURL(githubUrlWithKurtosisPackageInSubfolder)
Expand Down

0 comments on commit c4c3619

Please sign in to comment.