Skip to content

Commit c49c33e

Browse files
committed
Fix lint problem in ut
1 parent c4ee5b6 commit c49c33e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

coderd/workspacebuilds_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,10 @@ func TestPatchCancelWorkspaceBuild(t *testing.T) {
738738
})
739739
// Then: the request should fail with 412.
740740
require.Error(t, err)
741-
require.Equal(t, http.StatusPreconditionFailed, err.(*codersdk.Error).StatusCode())
741+
742+
var apiErr *codersdk.Error
743+
require.ErrorAs(t, err, &apiErr)
744+
require.Equal(t, http.StatusPreconditionFailed, apiErr.StatusCode())
742745
})
743746

744747
t.Run("Cancel with expect_state - invalid status", func(t *testing.T) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy