mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-11 23:26:53 +00:00
* Implement file localization for localize Implement file localization for new command kustomize localize * Patch file localization Fix lint errors, address feedback, begin transition to file loader from localizer * Add Repo() to Loader * Implement locLoader factory + cleanup * Add domain to RepoSpec Fix ssh relative url host parsing for non-github domain on the side * Implement Load(), New(), Root(), Dst() for LocLoader * Address repospec code review comments * Address 1st round of code review feedback * Address feedback #2 Removed localized path calculations to cover edge case and improve readability. * Remove ldr Cleanup logging * Address code review round #3 * Address code review feedback #4
19 lines
395 B
Go
19 lines
395 B
Go
// Copyright 2022 The Kubernetes Authors.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package localizer //nolint:testpackage
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestUrlBase(t *testing.T) {
|
|
require.Equal(t, "repo", urlBase("https://github.com/org/repo"))
|
|
}
|
|
|
|
func TestUrlBaseTrailingSlash(t *testing.T) {
|
|
require.Equal(t, "repo", urlBase("github.com/org/repo//"))
|
|
}
|