fix TestPartialRetrieval

This commit is contained in:
Łukasz Magiera 2021-11-10 18:57:10 +01:00
parent b9bd061bdd
commit d0503d409f

View File

@ -137,13 +137,14 @@ func TestPartialRetrieval(t *testing.T) {
DatamodelPathSelector: &textSelectorNonexistent, DatamodelPathSelector: &textSelectorNonexistent,
}, },
api.ExportRef{ api.ExportRef{
Root: carRoot,
FromLocalCAR: sourceCar, FromLocalCAR: sourceCar,
DatamodelPathSelector: &textSelectorNonexistent, DatamodelPathSelector: &textSelectorNonexistent,
}, },
&api.FileRef{}, &api.FileRef{},
nil, nil,
), ),
fmt.Sprintf("retrieval failed: path selection '%s' does not match a node within %s", textSelectorNonexistent, carRoot), fmt.Sprintf("path selection does not match a node within %s", carRoot),
) )
// ensure non-boundary retrievals fail // ensure non-boundary retrievals fail
@ -157,13 +158,14 @@ func TestPartialRetrieval(t *testing.T) {
DatamodelPathSelector: &textSelectorNonLink, DatamodelPathSelector: &textSelectorNonLink,
}, },
api.ExportRef{ api.ExportRef{
Root: carRoot,
FromLocalCAR: sourceCar, FromLocalCAR: sourceCar,
DatamodelPathSelector: &textSelectorNonLink, DatamodelPathSelector: &textSelectorNonLink,
}, },
&api.FileRef{}, &api.FileRef{},
nil, nil,
), ),
fmt.Sprintf("retrieval failed: error while locating partial retrieval sub-root: unsupported selection path '%s' does not correspond to a block boundary (a.k.a. CID link)", textSelectorNonLink), fmt.Sprintf("error while locating partial retrieval sub-root: unsupported selection path '%s' does not correspond to a block boundary (a.k.a. CID link)", textSelectorNonLink),
) )
} }