MCPcopy Create free account
hub / github.com/convox/rack / TestObjectStoreError

Function TestObjectStoreError

pkg/api/object_test.go:130–138  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

128}
129
130func TestObjectStoreError(t *testing.T) {
131 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {
132 var o1 *structs.Object
133 p.On("ObjectStore", "app1", "path/object1.ext", mock.Anything, structs.ObjectStoreOptions{}).Return(nil, fmt.Errorf("err1"))
134 err := c.Post("/apps/app1/objects/path/object1.ext", stdsdk.RequestOptions{}, &o1)
135 require.EqualError(t, err, "err1")
136 require.Nil(t, o1)
137 })
138}

Callers

nothing calls this directly

Calls 2

PostMethod · 0.80
testServerFunction · 0.70

Tested by

no test coverage detected