(fix): finalize v2 contracts (tests): cover v2 migration (doc): prepare release guidance
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetFileByLinkUsesConfiguredAPIURL(t *testing.T) {
|
||||
func TestGetFileByLinkLimitUsesConfiguredAPIURL(t *testing.T) {
|
||||
var gotPath string
|
||||
|
||||
client := &http.Client{
|
||||
@@ -33,9 +33,9 @@ func TestGetFileByLinkUsesConfiguredAPIURL(t *testing.T) {
|
||||
}
|
||||
}()
|
||||
|
||||
data, err := api.GetFileByLink("files/report.txt")
|
||||
data, err := api.GetFileByLinkLimit("files/report.txt", 1024)
|
||||
if err != nil {
|
||||
t.Fatalf("GetFileByLink returned error: %v", err)
|
||||
t.Fatalf("GetFileByLinkLimit returned error: %v", err)
|
||||
}
|
||||
if string(data) != "payload" {
|
||||
t.Fatalf("unexpected payload: %q", string(data))
|
||||
@@ -83,7 +83,7 @@ func TestOpenFileByLinkStreamsResponseBody(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetFileByLinkReturnsHTTPStatusError(t *testing.T) {
|
||||
func TestGetFileByLinkLimitReturnsHTTPStatusError(t *testing.T) {
|
||||
client := &http.Client{
|
||||
Transport: roundTripFunc(func(req *http.Request) (*http.Response, error) {
|
||||
return &http.Response{
|
||||
@@ -104,7 +104,7 @@ func TestGetFileByLinkReturnsHTTPStatusError(t *testing.T) {
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := api.GetFileByLink("files/report.txt")
|
||||
_, err := api.GetFileByLinkLimit("files/report.txt", 1024)
|
||||
if err == nil {
|
||||
t.Fatal("expected error for non-2xx response")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user