mirror of
https://gitgud.io/yats/libkiwi.git
synced 2026-06-28 23:12:04 -04:00
Add cookie convenience funcs
Fix test helper func
This commit is contained in:
+3
-3
@@ -58,7 +58,7 @@ func TestGetPost(t *testing.T) {
|
||||
t.Logf("Post text: %s\n", post.TextContent())
|
||||
}
|
||||
|
||||
func newTestKF() (*KF, error) {
|
||||
func newTestKF() (KF, error) {
|
||||
host := os.Getenv("TEST_HOST")
|
||||
if host == "" {
|
||||
host = _TEST_HOST
|
||||
@@ -66,7 +66,7 @@ func newTestKF() (*KF, error) {
|
||||
|
||||
u, err := url.Parse("https://" + host)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return KF{}, err
|
||||
}
|
||||
|
||||
p := proxy.FromEnvironment()
|
||||
@@ -76,7 +76,7 @@ func newTestKF() (*KF, error) {
|
||||
|
||||
jar, err := cookiejar.New(nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return KF{}, err
|
||||
}
|
||||
|
||||
hc := http.Client{
|
||||
|
||||
Reference in New Issue
Block a user