diff options
Diffstat (limited to 'common_test.go')
-rw-r--r-- | common_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common_test.go b/common_test.go index 1e90409..3aa3693 100644 --- a/common_test.go +++ b/common_test.go @@ -119,6 +119,13 @@ func (c *MockFetchPackSession) AdvertisedReferences() (*packp.AdvRefs, error) { func (c *MockFetchPackSession) FetchPack( r *packp.UploadPackRequest) (io.ReadCloser, error) { + if !r.Capabilities.Supports(capability.Agent) { + return nil, fmt.Errorf("" + + "invalid test rquest, missing Agent capability, the request" + + "should be created using NewUploadPackRequestFromCapabilities", + ) + } + f := fixtures.ByURL(c.endpoint.String()) if len(r.Wants) == 1 { |