Add overlay migration regression coverage
This commit is contained in:
@@ -89,6 +89,18 @@ settings:
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadImportsFromProfilesDirectoryAsBaseInput(t *testing.T) {
|
||||
directory := t.TempDir()
|
||||
mainPath := writeImportFile(t, directory, "main.yml", "configkit: {imports: [{path: profiles/shared.yml}]}\n")
|
||||
writeImportFile(t, directory, "profiles/shared.yml", "settings: {root: imported}\n")
|
||||
|
||||
result, err := testLoad[importTestConfig](File(mainPath), Options[importTestConfig]{Imports: true})
|
||||
if err != nil || result.Config.Settings.Root != "imported" || len(result.Sources()) != 2 ||
|
||||
result.Sources()[1].Layer != LayerBase {
|
||||
t.Fatalf("profiles import = %#v, %v", result, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadRejectsImportConflictsAndFragmentVersions(t *testing.T) {
|
||||
t.Run("all duplicate claimants", func(t *testing.T) {
|
||||
directory := t.TempDir()
|
||||
|
||||
Reference in New Issue
Block a user