Fix two broken deps to allow tests under hack/crawl to pass

1) copy api/internal/git to hack/crawl/crawler/: internal packages are
not allowed to be imported;
2) change the import path from api/pgmconfig to api/kconfig
This commit is contained in:
Haiyan Meng
2019-11-13 14:25:23 -08:00
parent 24f3d7556f
commit 5eef5f2777
7 changed files with 638 additions and 10 deletions

View File

@@ -16,9 +16,9 @@ import (
"strings"
"time"
"sigs.k8s.io/kustomize/api/git"
"sigs.k8s.io/kustomize/api/pgmconfig"
"sigs.k8s.io/kustomize/api/konfig"
"sigs.k8s.io/kustomize/hack/crawl/crawler"
"sigs.k8s.io/kustomize/hack/crawl/crawler/git"
"sigs.k8s.io/kustomize/hack/crawl/doc"
"sigs.k8s.io/kustomize/hack/crawl/httpclient"
)
@@ -122,7 +122,7 @@ func (gc githubCrawler) FetchDocument(ctx context.Context, d *doc.Document) erro
return nil
}
for _, file := range pgmconfig.RecognizedKustomizationFileNames() {
for _, file := range konfig.RecognizedKustomizationFileNames() {
resp, err = gc.client.GetRawUserContent(url + "/" + file)
err := handle(resp, err, "/"+file)
if err != nil {