Migrate acquisition fixtures to document-root controls
This commit is contained in:
@@ -17,9 +17,9 @@ func TestImportedAcquisitionClosesOwnedHostRootOnEveryExit(t *testing.T) {
|
||||
wantError bool
|
||||
wantPanic bool
|
||||
}{
|
||||
{name: "success", main: "configkit: {imports: [{path: child.yml}]}\n", child: "value: child\n"},
|
||||
{name: "error", main: "configkit: {imports: [{path: missing.yml, required: true}]}\n", wantError: true},
|
||||
{name: "version panic", main: "configkit: {imports: [{path: child.yml}]}\n", child: "version: v1\n", version: true, wantPanic: true},
|
||||
{name: "success", main: "config: {imports: [{path: child.yml}]}\n", child: "value: child\n"},
|
||||
{name: "error", main: "config: {imports: [{path: missing.yml, required: true}]}\n", wantError: true},
|
||||
{name: "version panic", main: "config: {imports: [{path: child.yml}]}\n", child: "version: v1\n", version: true, wantPanic: true},
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
@@ -80,7 +80,7 @@ func TestImportedAcquisitionClosesOwnedHostRootOnEveryExit(t *testing.T) {
|
||||
|
||||
func TestImportedAcquisitionClosesChildFileBeforeVersionPanic(t *testing.T) {
|
||||
filesystem := &observedFilesystem{files: fstest.MapFS{
|
||||
"main.yml": &fstest.MapFile{Data: []byte("configkit: {imports: [{path: child.yml}]}\n")},
|
||||
"main.yml": &fstest.MapFile{Data: []byte("config: {imports: [{path: child.yml}]}\n")},
|
||||
"child.yml": &fstest.MapFile{Data: []byte("version: v1\n")},
|
||||
}}
|
||||
namespace := newNativeNamespace("bundle", filesystem)
|
||||
|
||||
Reference in New Issue
Block a user