(c *C)
| 228 | } |
| 229 | |
| 230 | func (s *PublishedStorageSuite) TestFileExists(c *C) { |
| 231 | dir := c.MkDir() |
| 232 | err := os.WriteFile(filepath.Join(dir, "a"), []byte("welcome to swift!"), 0644) |
| 233 | c.Assert(err, IsNil) |
| 234 | |
| 235 | err = s.storage.PutFile("a/b.txt", filepath.Join(dir, "a")) |
| 236 | c.Check(err, IsNil) |
| 237 | |
| 238 | exists, err := s.storage.FileExists("a/b.txt") |
| 239 | c.Check(err, IsNil) |
| 240 | c.Check(exists, Equals, true) |
| 241 | |
| 242 | exists, err = s.storage.FileExists("a/b.invalid") |
| 243 | c.Check(err, IsNil) |
| 244 | c.Check(exists, Equals, false) |
| 245 | } |
nothing calls this directly
no test coverage detected