aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mason-core
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2023-06-22 00:03:07 +0200
committerGitHub <noreply@github.com>2023-06-22 00:03:07 +0200
commit82cae550c87466b1163b216bdb9c71cb71dd8f67 (patch)
treeaf0571ec1fd59e11c780494d9ef64f189442d7e5 /tests/mason-core
parentfeat(fetch): include mason.nvim version in User-Agent (#1362) (diff)
downloadmason-82cae550c87466b1163b216bdb9c71cb71dd8f67.tar
mason-82cae550c87466b1163b216bdb9c71cb71dd8f67.tar.gz
mason-82cae550c87466b1163b216bdb9c71cb71dd8f67.tar.bz2
mason-82cae550c87466b1163b216bdb9c71cb71dd8f67.tar.lz
mason-82cae550c87466b1163b216bdb9c71cb71dd8f67.tar.xz
mason-82cae550c87466b1163b216bdb9c71cb71dd8f67.tar.zst
mason-82cae550c87466b1163b216bdb9c71cb71dd8f67.zip
feat(fetch): add explicit default timeout to requests (#1364)
Diffstat (limited to 'tests/mason-core')
-rw-r--r--tests/mason-core/fetch_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/mason-core/fetch_spec.lua b/tests/mason-core/fetch_spec.lua
index 39351abe..107b6417 100644
--- a/tests/mason-core/fetch_spec.lua
+++ b/tests/mason-core/fetch_spec.lua
@@ -32,6 +32,7 @@ describe("fetch", function()
"/dev/null",
"-O",
"-",
+ "--timeout=30",
"--method=GET",
vim.NIL, -- body-data
"https://api.github.com",
@@ -54,6 +55,7 @@ describe("fetch", function()
match.same { "-X", "GET" },
vim.NIL, -- data
vim.NIL, -- out file
+ match.same { "--connect-timeout", 30 },
"https://api.github.com",
on_spawn = match.is_function(),
})
@@ -93,6 +95,7 @@ describe("fetch", function()
"/dev/null",
"-O",
"/test.json",
+ "--timeout=30",
"--method=GET",
vim.NIL, -- body-data
"https://api.github.com/data",
@@ -111,6 +114,7 @@ describe("fetch", function()
match.same { "-X", "GET" },
vim.NIL, -- data
match.same { "-o", "/test.json" },
+ match.same { "--connect-timeout", 30 },
"https://api.github.com/data",
on_spawn = match.is_function(),
})