Test files #13

This commit is contained in:
VnPower
2023-08-28 10:53:24 +07:00
parent 78be4c435f
commit 5668cf752f
2 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -4,4 +4,5 @@ steps:
commands:
- go get
- go build
- go test -v "handler/*"
- go test -v
secrets: [pixivfe_token]
+4 -3
View File
@@ -1,20 +1,21 @@
package handler
package main
import (
"net/http"
"os"
"pixivfe/handler"
"testing"
"time"
)
func generate_test_client() *PixivClient {
func generate_test_client() *handler.PixivClient {
transport := &http.Transport{Proxy: http.ProxyFromEnvironment}
client := &http.Client{
Timeout: time.Duration(5000) * time.Millisecond,
Transport: transport,
}
pc := &PixivClient{
pc := &handler.PixivClient{
Client: client,
Header: make(map[string]string),
Cookie: make(map[string]string),