func (*storageSuite) TestRemoveAll(c *gc.C) { // When we ask gwacl to remove all blobs, it calls DeleteContainer. response := makeResponse("", http.StatusAccepted) storage, transport := makeFakeStorage("cntnr", "account", "") transport.AddExchange(response, nil) err := storage.RemoveAll() c.Assert(err, gc.IsNil) _, err = storage.getStorageContext() c.Assert(err, gc.IsNil) // Without going too far into gwacl's innards, this is roughly what // it needs to do in order to delete a container. c.Assert(transport.ExchangeCount, gc.Equals, 1) c.Check(transport.Exchanges[0].Request.URL.String(), gc.Matches, "http.*/cntnr?.*restype=container.*") c.Check(transport.Exchanges[0].Request.Method, gc.Equals, "DELETE") }
func (f *fileStorageWriter) RemoveAll() error { return storage.RemoveAll(f) }
func (s *localStorage) RemoveAll() error { return storage.RemoveAll(s) }