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

Function TestSystemResourceGetError

pkg/api/resource_test.go:136–144  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

134}
135
136func TestSystemResourceGetError(t *testing.T) {
137 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {
138 var r1 *structs.Resource
139 p.On("SystemResourceGet", "resource1").Return(nil, fmt.Errorf("err1"))
140 err := c.Get("/resources/resource1", stdsdk.RequestOptions{}, &r1)
141 require.EqualError(t, err, "err1")
142 require.Nil(t, r1)
143 })
144}
145
146func TestSystemResourceLink(t *testing.T) {
147 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {

Callers

nothing calls this directly

Calls 2

testServerFunction · 0.70
GetMethod · 0.65

Tested by

no test coverage detected