mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 18:10:59 +00:00
Move demandDirectoryRoot into kyaml/filesys (#4677)
* Move demandDirectoryRoot into kyaml/filesys * Make root directory platform-agnostic Support windows root directory. Dogfood own error package. * Use cleaner windows support implementation * Address feedback * Address feedback x2 * Re-apply go.sum changes to avoid CI errors
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"sigs.k8s.io/kustomize/api/konfig"
|
||||
"sigs.k8s.io/kustomize/api/loader"
|
||||
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
|
||||
)
|
||||
|
||||
@@ -551,7 +552,7 @@ components:
|
||||
`),
|
||||
},
|
||||
runPath: "filesincomponents",
|
||||
expectedError: "'/filesincomponents/stub.yaml' must be a directory so that it can used as a build root",
|
||||
expectedError: fmt.Sprintf("%s: '%s'", loader.ErrRtNotDir.Error(), "/filesincomponents/stub.yaml"),
|
||||
},
|
||||
"invalid-component-api-version": {
|
||||
input: []FileGen{writeTestBase, writeOverlayProd,
|
||||
|
||||
@@ -323,7 +323,7 @@ func TestRemoteResourceWithHttpError(t *testing.T) {
|
||||
|
||||
_, err := b.Run(fSys, tmpDir.String())
|
||||
|
||||
httpErr := fmt.Errorf("%w: status code %d (%s)", loader.ErrorHTTP, 404, http.StatusText(404))
|
||||
httpErr := fmt.Errorf("%w: status code %d (%s)", loader.ErrHTTP, 404, http.StatusText(404))
|
||||
accuFromErr := fmt.Errorf("accumulating resources from '%s': %w", url404, httpErr)
|
||||
expectedErr := fmt.Errorf("accumulating resources: %w", accuFromErr)
|
||||
req.EqualErrorf(err, expectedErr.Error(), url404)
|
||||
|
||||
Reference in New Issue
Block a user