(c *C)
| 375 | } |
| 376 | |
| 377 | func (s *PublishedStorageSuite) TestFileExists(c *C) { |
| 378 | s.manager.searchReader = createReader(c, []jfrogutils.ResultItem{{Path: "repo/prefix/pool", Name: "x"}}) |
| 379 | ok, err := s.storage.FileExists("pool/x") |
| 380 | c.Assert(err, IsNil) |
| 381 | c.Assert(ok, Equals, true) |
| 382 | c.Assert(s.manager.searchParams[0].Pattern, Equals, filepath.Join("repo", "prefix", "pool/x")) |
| 383 | |
| 384 | s.manager.searchReader = content.NewEmptyContentReader("results") |
| 385 | ok, err = s.storage.FileExists("pool/y") |
| 386 | c.Assert(err, IsNil) |
| 387 | c.Assert(ok, Equals, false) |
| 388 | } |
| 389 | |
| 390 | func (s *PublishedStorageSuite) TestFileExistsSearchErrorAndPlusWorkaround(c *C) { |
| 391 | s.storage.plusWorkaround = true |
nothing calls this directly
no test coverage detected