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

Function TestObjectExistsError

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

Source from the content-addressed store, hash-verified

44}
45
46func TestObjectExistsError(t *testing.T) {
47 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {
48 var exists bool
49 p.On("ObjectExists", "app1", "path/object1.ext").Return(false, fmt.Errorf("err1"))
50 err := c.Head("/apps/app1/objects/path/object1.ext", stdsdk.RequestOptions{}, &exists)
51 require.EqualError(t, err, "response status 500")
52 require.Equal(t, false, exists)
53 })
54}
55
56func TestObjectFetch(t *testing.T) {
57 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {

Callers

nothing calls this directly

Calls 1

testServerFunction · 0.70

Tested by

no test coverage detected