~julian-edwards/gwacl/delete-container

« back to all changes in this revision

Viewing changes to storage_base_test.go

  • Committer: Julian Edwards
  • Date: 2013-07-29 00:21:28 UTC
  • Revision ID: julian.edwards@canonical.com-20130729002128-4wujzm5l2uw0ix8n
improve test

Show diffs side-by-side

added added

removed removed

Lines of Context:
675
675
    error := fmt.Errorf("canned-error")
676
676
    context := makeStorageContext(&TestTransport{Error: error})
677
677
    err := context.DeleteContainer("container")
678
 
    c.Assert(err, NotNil)
 
678
    c.Assert(err, ErrorMatches, ".*canned-error.*")
679
679
}
680
680
 
681
681
// Server-side errors are propagated back to the caller.
683
683
    response := makeHttpResponse(http.StatusNotFound, "not found")
684
684
    context := makeStorageContext(&TestTransport{Response: response})
685
685
    err := context.DeleteContainer("container")
686
 
    c.Assert(err, NotNil)
 
686
    c.Assert(err, ErrorMatches, ".*Not Found.*")
687
687
}
688
688
 
689
689
// Server-side errors are propagated back to the caller.
691
691
    response := makeHttpResponse(http.StatusOK, "")
692
692
    context := makeStorageContext(&TestTransport{Response: response})
693
693
    err := context.DeleteContainer("container")
694
 
    c.Assert(err, NotNil)
 
694
    c.Assert(err, ErrorMatches, ".*Azure request failed.*")
695
695
}
696
696
 
697
697
// Azure HTTP errors (for instance 404 responses) are propagated back to