Skip to content

Commit

Permalink
Revert "test: create case showcasing that a 205 breaks DoWithContext"
Browse files Browse the repository at this point in the history
This reverts commit 17ee4c6.
  • Loading branch information
nobe4 committed May 19, 2024
1 parent 17b8084 commit d754f9e
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions pkg/api/rest_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,24 +303,6 @@ func TestRESTClientPatch(t *testing.T) {
assert.True(t, gock.IsDone(), printPendingMocks(gock.Pending()))
}

func TestRESTClientPatchStatus205(t *testing.T) {
t.Cleanup(gock.Off)
gock.New("https://api.github.com").
Patch("/some/path/here").
BodyString(`{}`).
Reply(205).
BodyString("")
client, _ := NewRESTClient(ClientOptions{
Host: "github.com",
AuthToken: "token",
Transport: http.DefaultTransport,
})
r := bytes.NewReader([]byte(`{}`))
err := client.Patch("some/path/here", r, nil)
assert.NoError(t, err)
assert.True(t, gock.IsDone(), printPendingMocks(gock.Pending()))
}

func TestRESTClientPost(t *testing.T) {
t.Cleanup(gock.Off)
gock.New("https://api.github.com").
Expand Down

0 comments on commit d754f9e

Please sign in to comment.