All files / src/oauth gitlab-request-bound.ts

100% Statements 2/2
100% Branches 0/0
100% Functions 0/0
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11              235x   235x  
/**
 * Longest time one OAuth request to GitLab can take under the configured request timeouts:
 * two connects (through a proxy the second is the TLS handshake to GitLab), the response
 * headers and the response body. A reservation that must outlast a GitLab request it
 * guards (single-use device codes, single-use refresh tokens) lasts at least this long.
 */
 
import { BODY_TIMEOUT_MS, CONNECT_TIMEOUT_MS, HEADERS_TIMEOUT_MS } from '../config';
 
export const GITLAB_REQUEST_MAX_MS = 2 * CONNECT_TIMEOUT_MS + HEADERS_TIMEOUT_MS + BODY_TIMEOUT_MS;