fix(rados): Create OMAP for root directory
When using the RADOS driver, the hierarchy of the files is stored in OMAPs, but the root OMAP was not created and a call to List("/") was returning an error instead of returned the first level files stored. This patches creates an OMAP for "/" and excludes the listed directory from the list of files returned. Signed-off-by: Vincent Giersch <vincent@giersch.fr>
This commit is contained in:
parent
e7435725af
commit
9bf231e0fa
2 changed files with 13 additions and 3 deletions
|
@ -87,6 +87,14 @@ func (suite *DriverSuite) TearDownTest(c *check.C) {
|
|||
}
|
||||
}
|
||||
|
||||
// TestRootExists ensures that all storage drivers have a root path by default.
|
||||
func (suite *DriverSuite) TestRootExists(c *check.C) {
|
||||
_, err := suite.StorageDriver.List(suite.ctx, "/")
|
||||
if err != nil {
|
||||
c.Fatalf(`the root path "/" should always exist: %v`, err)
|
||||
}
|
||||
}
|
||||
|
||||
// TestValidPaths checks that various valid file paths are accepted by the
|
||||
// storage driver.
|
||||
func (suite *DriverSuite) TestValidPaths(c *check.C) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue