Consolidate import request ownership
This commit is contained in:
@@ -216,7 +216,8 @@ func TestGlobTraversalBoundsNonmatchesAndAcceptedCandidates(t *testing.T) {
|
||||
main := parseImportMain(t, mainPath)
|
||||
limits := defaultImportLimits()
|
||||
limits.entries = 2
|
||||
_, _, diagnostics := loadImportedDocuments(File(mainPath), nil, main, nil, limits)
|
||||
request := testImportRequest(File(mainPath), nil, main, Path{}, nil, nil)
|
||||
_, _, diagnostics := testAcquireImportWithLimits(request, limits)
|
||||
if len(diagnostics) != 1 || diagnostics[0].Code != CodeImportLimitExceeded {
|
||||
t.Fatalf("entry-budget diagnostics = %#v", diagnostics)
|
||||
}
|
||||
@@ -228,7 +229,8 @@ func TestGlobTraversalBoundsNonmatchesAndAcceptedCandidates(t *testing.T) {
|
||||
main = parseImportMain(t, mainPath)
|
||||
limits = defaultImportLimits()
|
||||
limits.sources = 2
|
||||
_, _, diagnostics = loadImportedDocuments(File(mainPath), nil, main, nil, limits)
|
||||
request = testImportRequest(File(mainPath), nil, main, Path{}, nil, nil)
|
||||
_, _, diagnostics = testAcquireImportWithLimits(request, limits)
|
||||
if len(diagnostics) != 1 || diagnostics[0].Code != CodeImportLimitExceeded {
|
||||
t.Fatalf("candidate-budget diagnostics = %#v", diagnostics)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user