feat: HTTP debug logging in client.do()

This commit is contained in:
2026-07-28 23:57:24 +08:00
parent b7085af9d3
commit 9faf881efa
4 changed files with 25 additions and 7 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ func TestServerList(t *testing.T) {
}))
defer srv.Close()
rain := &Rainyun{client: newClient(srv.URL, "sk-test")}
rain := &Rainyun{client: newClient(srv.URL, "sk-test", false)}
svc := rain.Server()
servers, err := svc.List(context.Background())
if err != nil {
@@ -66,7 +66,7 @@ func TestServerStart(t *testing.T) {
}))
defer srv.Close()
rain := &Rainyun{client: newClient(srv.URL, "sk-test")}
rain := &Rainyun{client: newClient(srv.URL, "sk-test", false)}
err := rain.Server().Start(context.Background(), "12001")
if err != nil {
t.Fatalf("Start() error: %v", err)
@@ -83,7 +83,7 @@ func TestServerVNC(t *testing.T) {
}))
defer srv.Close()
rain := &Rainyun{client: newClient(srv.URL, "sk-test")}
rain := &Rainyun{client: newClient(srv.URL, "sk-test", false)}
url, err := rain.Server().GetVNC(context.Background(), "12001")
if err != nil {
t.Fatalf("GetVNC() error: %v", err)