Migrate acquisition fixtures to document-root controls
This commit is contained in:
@@ -72,7 +72,7 @@ func TestSelectNamedImportsChecksRequiredTargetsBeforeExclusions(t *testing.T) {
|
||||
t.Fatal(diagnostics)
|
||||
}
|
||||
_, diagnostics = selectNamedImportCandidates(access, root, specs[0], policy)
|
||||
if len(diagnostics) != 1 || diagnostics[0].Code != CodeImportMissing || diagnostics[0].Path.String() != "/configkit/imports/0/path" {
|
||||
if len(diagnostics) != 1 || diagnostics[0].Code != CodeImportMissing || diagnostics[0].Path.String() != "/config/imports/0/path" {
|
||||
t.Fatalf("required excluded missing target diagnostics = %#v", diagnostics)
|
||||
}
|
||||
}
|
||||
@@ -171,8 +171,8 @@ func TestSelectNamedImportsChecksNormalizedPathsLexically(t *testing.T) {
|
||||
}}
|
||||
failingAccess := newNativeAccess(failingFilesystem, ".", &namespaceToken{})
|
||||
_, diagnostics = selectNamedImportCandidates(failingAccess, ".", specs[0], resolvedImportPolicy{})
|
||||
if len(diagnostics) != 1 || diagnostics[0].Code != CodeImportInvalid || diagnostics[0].Path.String() != "/configkit/imports/0/path/1" {
|
||||
t.Fatalf("first lexical failure = %#v, want /configkit/imports/0/path/1", diagnostics)
|
||||
if len(diagnostics) != 1 || diagnostics[0].Code != CodeImportInvalid || diagnostics[0].Path.String() != "/config/imports/0/path/1" {
|
||||
t.Fatalf("first lexical failure = %#v, want /config/imports/0/path/1", diagnostics)
|
||||
}
|
||||
if diagnostics[0].Primary == nil || diagnostics[0].Primary.SourceID != "source-1" {
|
||||
t.Fatalf("first lexical failure location = %#v", diagnostics[0].Primary)
|
||||
|
||||
Reference in New Issue
Block a user