aboutsummaryrefslogtreecommitdiff
path: root/spec/build_spec.lua
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-02-26 14:11:37 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-02-27 13:28:33 -0300
commit6bc6ede826843c3692971c14c27c3d27714b2126 (patch)
treea15196f6617c6cd6d683b69c51a26f57940d55bd /spec/build_spec.lua
parente0aa47df12c9b9beb05d380aac7d90a28a081a7b (diff)
downloadluarocks-6bc6ede826843c3692971c14c27c3d27714b2126.tar.gz
luarocks-6bc6ede826843c3692971c14c27c3d27714b2126.tar.bz2
luarocks-6bc6ede826843c3692971c14c27c3d27714b2126.zip
tests(fetch): do not use restserver
Diffstat (limited to 'spec/build_spec.lua')
-rw-r--r--spec/build_spec.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/spec/build_spec.lua b/spec/build_spec.lua
index 9b34ec54..a2c09119 100644
--- a/spec/build_spec.lua
+++ b/spec/build_spec.lua
@@ -64,8 +64,8 @@ describe("LuaRocks build #integration", function()
64 test = "test.lua" 64 test = "test.lua"
65 } 65 }
66 } 66 }
67 ]], finally) 67 ]])
68 write_file("test.lua", "return {}", finally) 68 write_file("test.lua", "return {}")
69 69
70 assert.is_true(run.luarocks_bool("build --verbose test-1.0-1.rockspec")) 70 assert.is_true(run.luarocks_bool("build --verbose test-1.0-1.rockspec"))
71 assert.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/test/1.0-1/test-1.0-1.rockspec")) 71 assert.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/test/1.0-1/test-1.0-1.rockspec"))
@@ -119,8 +119,8 @@ describe("LuaRocks build #integration", function()
119 test = "test.lua" 119 test = "test.lua"
120 } 120 }
121 } 121 }
122 ]], finally) 122 ]])
123 write_file("test.lua", "return {}", finally) 123 write_file("test.lua", "return {}")
124 124
125 if test_env.TEST_TARGET_OS == "windows" then 125 if test_env.TEST_TARGET_OS == "windows" then
126 assert.is_false(run.luarocks_bool("build test-1.0-1.rockspec")) -- Error: This rockspec does not support windows platforms 126 assert.is_false(run.luarocks_bool("build test-1.0-1.rockspec")) -- Error: This rockspec does not support windows platforms
@@ -149,8 +149,8 @@ describe("LuaRocks build #integration", function()
149 test = "test.lua" 149 test = "test.lua"
150 } 150 }
151 } 151 }
152 ]], finally) 152 ]])
153 write_file("test.lua", "return {}", finally) 153 write_file("test.lua", "return {}")
154 154
155 assert.is_true(run.luarocks_bool("build test-1.0-1.rockspec --deps-mode=none")) 155 assert.is_true(run.luarocks_bool("build test-1.0-1.rockspec --deps-mode=none"))
156 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/test/1.0-1/test-1.0-1.rockspec")) 156 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/test/1.0-1/test-1.0-1.rockspec"))
@@ -174,8 +174,8 @@ describe("LuaRocks build #integration", function()
174 test = "test.lua" 174 test = "test.lua"
175 } 175 }
176 } 176 }
177 ]], finally) 177 ]])
178 write_file("test.lua", "return {}", finally) 178 write_file("test.lua", "return {}")
179 179
180 assert.is_true(run.luarocks_bool("build --server=" .. testing_paths.fixtures_dir .. "/a_repo test-1.0-1.rockspec --pin --tree=lua_modules")) 180 assert.is_true(run.luarocks_bool("build --server=" .. testing_paths.fixtures_dir .. "/a_repo test-1.0-1.rockspec --pin --tree=lua_modules"))
181 assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/1.0-1/test-1.0-1.rockspec")) 181 assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/1.0-1/test-1.0-1.rockspec"))
@@ -189,7 +189,7 @@ describe("LuaRocks build #integration", function()
189 ["lua"] = test_env.lua_version .. "-1", 189 ["lua"] = test_env.lua_version .. "-1",
190 } 190 }
191 }, lockdata) 191 }, lockdata)
192 end) 192 end, finally)
193 end) 193 end)
194 194
195 it("supports --pin --only-deps #pinning", function() 195 it("supports --pin --only-deps #pinning", function()
@@ -209,8 +209,8 @@ describe("LuaRocks build #integration", function()
209 test = "test.lua" 209 test = "test.lua"
210 } 210 }
211 } 211 }
212 ]], finally) 212 ]])
213 write_file("test.lua", "return {}", finally) 213 write_file("test.lua", "return {}")
214 214
215 assert.is_true(run.luarocks_bool("build --server=" .. testing_paths.fixtures_dir .. "/a_repo test-1.0-1.rockspec --pin --only-deps --tree=lua_modules")) 215 assert.is_true(run.luarocks_bool("build --server=" .. testing_paths.fixtures_dir .. "/a_repo test-1.0-1.rockspec --pin --only-deps --tree=lua_modules"))
216 assert.is.falsy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/1.0-1/test-1.0-1.rockspec")) 216 assert.is.falsy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/1.0-1/test-1.0-1.rockspec"))
@@ -225,7 +225,7 @@ describe("LuaRocks build #integration", function()
225 ["lua"] = test_env.lua_version .. "-1", 225 ["lua"] = test_env.lua_version .. "-1",
226 } 226 }
227 }, lockdata) 227 }, lockdata)
228 end) 228 end, finally)
229 end) 229 end)
230 230
231 it("lmathx deps partial match", function() 231 it("lmathx deps partial match", function()
@@ -316,8 +316,8 @@ describe("LuaRocks build #integration", function()
316 test = "test.lua" 316 test = "test.lua"
317 } 317 }
318 } 318 }
319 ]], finally) 319 ]])
320 write_file("test.lua", "return {}", finally) 320 write_file("test.lua", "return {}")
321 321
322 assert.is.truthy(run.luarocks_bool("build --server=" .. testing_paths.fixtures_dir .. "/a_repo test-1.0-1.rockspec --only-deps")) 322 assert.is.truthy(run.luarocks_bool("build --server=" .. testing_paths.fixtures_dir .. "/a_repo test-1.0-1.rockspec --only-deps"))
323 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/test/1.0-1/test-1.0-1.rockspec")) 323 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/test/1.0-1/test-1.0-1.rockspec"))
@@ -342,8 +342,8 @@ describe("LuaRocks build #integration", function()
342 test = "test.lua" 342 test = "test.lua"
343 } 343 }
344 } 344 }
345 ]], finally) 345 ]])
346 write_file("test.lua", "return {}", finally) 346 write_file("test.lua", "return {}")
347 347
348 assert.is.truthy(run.luarocks_bool("pack test-1.0-1.rockspec")) 348 assert.is.truthy(run.luarocks_bool("pack test-1.0-1.rockspec"))
349 assert.is.truthy(lfs.attributes("test-1.0-1.src.rock")) 349 assert.is.truthy(lfs.attributes("test-1.0-1.src.rock"))
@@ -489,7 +489,7 @@ describe("LuaRocks build #integration", function()
489 build = "build.lua" 489 build = "build.lua"
490 } 490 }
491 } 491 }
492 ]], finally) 492 ]])
493 assert.is_false(run.luarocks_bool("build missing_external-0.1-1.rockspec INEXISTENT_INCDIR=\"/invalid/dir\"")) 493 assert.is_false(run.luarocks_bool("build missing_external-0.1-1.rockspec INEXISTENT_INCDIR=\"/invalid/dir\""))
494 end, finally) 494 end, finally)
495 end) 495 end)