Migrate acquisition fixtures to document-root controls
This commit is contained in:
@@ -151,11 +151,11 @@ func TestLoadingClosesNativeFilesAcrossPipelineOutcomes(t *testing.T) {
|
||||
{name: "success", main: "value: retained\n"},
|
||||
{name: "acquisition", main: "value: retained\n", failRead: "main.yml", wantErr: true},
|
||||
{name: "parse", main: "value: [broken\n", wantErr: true},
|
||||
{name: "composition", main: "configkit: {imports: [{path: child.yml}]}\nvalue: first\n", child: "value: second\n", options: Options[config]{Imports: true}, wantErr: true},
|
||||
{name: "composition", main: "config: {imports: [{path: child.yml}]}\nvalue: first\n", child: "value: second\n", options: Options[config]{Imports: true}, wantErr: true},
|
||||
{
|
||||
name: "nested item composition",
|
||||
main: "configkit: {imports: [{path: child.yml, destination: [children], placement: sequence-item}]}\nid: parent\n",
|
||||
child: "configkit: {imports: [{path: helper.yml}]}\nid: child\nvalue: child\n",
|
||||
main: "config: {imports: [{path: child.yml, destination: [children], placement: sequence-item}]}\nid: parent\n",
|
||||
child: "config: {imports: [{path: helper.yml}]}\nid: child\nvalue: child\n",
|
||||
helper: "value: helper\n",
|
||||
options: Options[config]{
|
||||
Imports: true, Destination: Keys("groups"), PlacementMode: PlacementModeSequenceItem,
|
||||
@@ -206,7 +206,7 @@ func TestDirectorySelectorsFailOnPostOpenNotExistErrors(t *testing.T) {
|
||||
{name: "glob no progress", selector: "glob", noProgress: true},
|
||||
} {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
main := "configkit:\n imports:\n"
|
||||
main := "config:\n imports:\n"
|
||||
if test.selector == "directory" {
|
||||
main += " - dir: [broken, good]\n pattern: '*.yml'\n"
|
||||
} else {
|
||||
@@ -324,7 +324,7 @@ func TestReadDirectoryVisitStopCloseNotExistIsPostOpen(t *testing.T) {
|
||||
func TestDirectorySelectorsKeepMissingRootsOptional(t *testing.T) {
|
||||
for _, selector := range []string{"directory", "glob"} {
|
||||
t.Run(selector, func(t *testing.T) {
|
||||
main := "configkit:\n imports:\n"
|
||||
main := "config:\n imports:\n"
|
||||
if selector == "directory" {
|
||||
main += " - dir: [missing, good]\n pattern: '*.yml'\n required: true\n"
|
||||
} else {
|
||||
@@ -347,7 +347,7 @@ func TestDirectorySelectorsKeepMissingRootsOptional(t *testing.T) {
|
||||
func TestDirectorySelectorsTreatMissingOnOpenAsOptional(t *testing.T) {
|
||||
for _, selector := range []string{"directory", "glob"} {
|
||||
t.Run(selector, func(t *testing.T) {
|
||||
main := "configkit:\n imports:\n"
|
||||
main := "config:\n imports:\n"
|
||||
if selector == "directory" {
|
||||
main += " - dir: [broken, good]\n pattern: '*.yml'\n required: true\n"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user