diff --git a/pkg/config/import_test.go b/pkg/config/import_test.go index c25b6bcd8..5b3120711 100644 --- a/pkg/config/import_test.go +++ b/pkg/config/import_test.go @@ -89,6 +89,7 @@ func TestProcessImports(t *testing.T) { assert.NotContains(t, resolvedPaths, "http://invalid-url.com", "Invalid URL should not be resolved") assert.NotContains(t, resolvedPaths, "", "Empty import path should not be resolved") } + func TestProcessImportNested(t *testing.T) { baseDir, err := os.MkdirTemp("", "config-test") assert.NoError(t, err) diff --git a/pkg/config/imports.go b/pkg/config/imports.go index e6287f4a8..d2458d58b 100644 --- a/pkg/config/imports.go +++ b/pkg/config/imports.go @@ -62,6 +62,7 @@ func processConfigImports(source schema.AtmosConfiguration, dst *viper.Viper) er } return nil } + func processImports(basePath string, importPaths []string, tempDir string, currentDepth, maxDepth int) (resolvedPaths []ResolvedPaths, err error) { if basePath == "" { return nil, fmt.Errorf("base_Path required to process imports") @@ -374,6 +375,7 @@ func findMatchingFiles(patterns []string) ([]string, error) { return filePaths, nil } + func downloadRemoteConfig(url string, tempDir string) (string, error) { // uniq name for the temp file fileName := fmt.Sprintf("atmos-import-%d.yaml", time.Now().UnixNano()) diff --git a/pkg/config/load.go b/pkg/config/load.go index 05abea6a2..f5c20749f 100644 --- a/pkg/config/load.go +++ b/pkg/config/load.go @@ -179,6 +179,7 @@ func readEnvAmosConfigPath(v *viper.Viper) error { return nil } + func readAtmosConfigCli(v *viper.Viper, atmosCliConfigPath string) error { if len(atmosCliConfigPath) == 0 { return nil