make AuthHooks test faster

This commit is contained in:
Umputun
2019-04-12 10:14:17 -05:00
parent c52e5b3920
commit 3d61be8c44
+2 -2
View File
@@ -358,7 +358,7 @@ func Test_ACMEEmail(t *testing.T) {
}
func TestServerAuthHooks(t *testing.T) {
app, ctx := prepServerApp(t, 10000*time.Millisecond, func(o ServerCommand) ServerCommand {
app, ctx := prepServerApp(t, 5*time.Second, func(o ServerCommand) ServerCommand {
o.Port = 18080
return o
})
@@ -387,7 +387,7 @@ func TestServerAuthHooks(t *testing.T) {
t.Log(tk)
// add comment
client := http.Client{Timeout: 5 * time.Second}
client := http.Client{Timeout: 1 * time.Second}
req, err := http.NewRequest("POST", "http://localhost:18080/api/v1/comment",
strings.NewReader(`{"text": "test 123", "locator":{"url": "https://radio-t.com/p/2018/12/29/podcast-630/", "site": "remark"}}`))
req.Header.Set("X-JWT", tk)