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

Function TestObjectFetchError

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

Source from the content-addressed store, hash-verified

69}
70
71func TestObjectFetchError(t *testing.T) {
72 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {
73 p.On("ObjectFetch", "app1", "path/object1.ext").Return(nil, fmt.Errorf("err1"))
74 res, err := c.GetStream("/apps/app1/objects/path/object1.ext", stdsdk.RequestOptions{})
75 require.EqualError(t, err, "err1")
76 require.Nil(t, res)
77 })
78}
79
80func TestObjectList(t *testing.T) {
81 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