MCPcopy Index your code
hub / github.com/coder/coder / SDKError

Function SDKError

coderd/coderdtest/coderdtest.go:1772–1776  ·  view source on GitHub ↗

SDKError coerces err into an SDK error.

(t testing.TB, err error)

Source from the content-addressed store, hash-verified

1770
1771// SDKError coerces err into an SDK error.
1772func SDKError(t testing.TB, err error) *codersdk.Error {
1773 var cerr *codersdk.Error
1774 require.True(t, errors.As(err, &cerr), "should be SDK error, got %s", err)
1775 return cerr
1776}
1777
1778func DeploymentValues(t testing.TB, mut ...func(*codersdk.DeploymentValues)) *codersdk.DeploymentValues {
1779 cfg := &codersdk.DeploymentValues{}

Callers 6

TestGetUserStatusCountsFunction · 0.92
requireSDKErrorStatusFunction · 0.92
TestUpdateUserPasswordFunction · 0.92
TestDeleteFunction · 0.92

Calls 1

AsMethod · 0.80

Tested by 6

TestGetUserStatusCountsFunction · 0.74
requireSDKErrorStatusFunction · 0.74
TestUpdateUserPasswordFunction · 0.74
TestDeleteFunction · 0.74