(t *testing.T)
| 44 | } |
| 45 | |
| 46 | func 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 | |
| 56 | func TestObjectFetch(t *testing.T) { |
| 57 | testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) { |
nothing calls this directly
no test coverage detected