From 8b2dfe0b6861c3cea22078f78f6c3d9cc6cd733f Mon Sep 17 00:00:00 2001 From: Peter Melnichenko <mpeterval@gmail.com> Date: Mon, 11 Sep 2017 12:49:12 +0300 Subject: Remove www. from rock repository URL in tests www.luarocks.org redirects to luarocks.org. --- test/test_environment.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_environment.lua b/test/test_environment.lua index 6f6f1cfe..c781af4b 100644 --- a/test/test_environment.lua +++ b/test/test_environment.lua @@ -285,7 +285,7 @@ end -- @param save_path string: path to directory, where to download rocks/rockspecs -- @return make_manifest boolean: true if new rocks downloaded local function download_rocks(urls, save_path) - local luarocks_repo = "https://www.luarocks.org" + local luarocks_repo = "https://luarocks.org" local make_manifest = false for _, url in ipairs(urls) do -- cgit v1.2.3-55-g6feb From 85701e003241798e36b81ed1e3ed285f7bf5c7a0 Mon Sep 17 00:00:00 2001 From: Peter Melnichenko <mpeterval@gmail.com> Date: Mon, 11 Sep 2017 13:19:03 +0300 Subject: Clarify test_env.need_rock description wrt return value --- spec/upload_spec.lua | 2 +- test/test_environment.lua | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/spec/upload_spec.lua b/spec/upload_spec.lua index 8b3e0433..6ec8e302 100644 --- a/spec/upload_spec.lua +++ b/spec/upload_spec.lua @@ -50,7 +50,7 @@ describe("LuaRocks upload tests #blackbox #b_upload", function() describe("LuaRocks upload tests with Xavante server #mock", function() before_each(function() - assert.is.truthy(test_env.need_rock("restserver-xavante")) + assert.is_true(test_env.need_rock("restserver-xavante")) local final_command = test_env.execute_helper(testing_paths.lua .. " " .. testing_paths.testing_dir .. "/mock-server.lua &", true, test_env.env_variables) os.execute(final_command) end) diff --git a/test/test_environment.lua b/test/test_environment.lua index c781af4b..bc1e5277 100644 --- a/test/test_environment.lua +++ b/test/test_environment.lua @@ -533,7 +533,9 @@ function test_env.setup_specs(extra_rocks) end end ---- Test if required rock is installed if not, install it +--- Test if required rock is installed and if not, install it. +-- Return `true` if the rock is already installed or has been installed successfully, +-- `false` if installation failed. function test_env.need_rock(rock) print("Check if " .. rock .. " is installed") if test_env.run.luarocks_noprint_nocov(test_env.quiet("show " .. rock)) then -- cgit v1.2.3-55-g6feb