diff options
Diffstat (limited to 'spec/upload_spec.lua')
| -rw-r--r-- | spec/upload_spec.lua | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/spec/upload_spec.lua b/spec/upload_spec.lua index ff39cb96..6ec8e302 100644 --- a/spec/upload_spec.lua +++ b/spec/upload_spec.lua | |||
| @@ -5,8 +5,6 @@ local testing_paths = test_env.testing_paths | |||
| 5 | test_env.unload_luarocks() | 5 | test_env.unload_luarocks() |
| 6 | 6 | ||
| 7 | local extra_rocks = { | 7 | local extra_rocks = { |
| 8 | "/lua-cjson-2.1.0-1.src.rock", | ||
| 9 | |||
| 10 | -- rocks needed for mock-server | 8 | -- rocks needed for mock-server |
| 11 | "/copas-2.0.1-1.src.rock", | 9 | "/copas-2.0.1-1.src.rock", |
| 12 | "/coxpcall-1.16.0-1.src.rock", | 10 | "/coxpcall-1.16.0-1.src.rock", |
| @@ -42,18 +40,17 @@ describe("LuaRocks upload tests #blackbox #b_upload", function() | |||
| 42 | end) | 40 | end) |
| 43 | 41 | ||
| 44 | it("LuaRocks upload api key invalid and skip-pack", function() | 42 | it("LuaRocks upload api key invalid and skip-pack", function() |
| 45 | assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --skip-pack luacov-0.11.0-1.rockspec")) | 43 | assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --skip-pack " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec")) |
| 46 | end) | 44 | end) |
| 47 | 45 | ||
| 48 | it("LuaRocks upload force #unix", function() | 46 | it("LuaRocks upload force #unix", function() |
| 49 | assert.is_true(run.luarocks_bool("install lua-cjson")) | 47 | assert.is_true(test_env.need_rock("dkjson")) |
| 50 | assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --force luacov-0.11.0-1.rockspec")) | 48 | assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --force " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec")) |
| 51 | assert.is_true(run.luarocks_bool("install lua-cjson")) | ||
| 52 | end) | 49 | end) |
| 53 | 50 | ||
| 54 | describe("LuaRocks upload tests with Xavante server #mock", function() | 51 | describe("LuaRocks upload tests with Xavante server #mock", function() |
| 55 | before_each(function() | 52 | before_each(function() |
| 56 | assert.is.truthy(test_env.need_rock("restserver-xavante")) | 53 | assert.is_true(test_env.need_rock("restserver-xavante")) |
| 57 | local final_command = test_env.execute_helper(testing_paths.lua .. " " .. testing_paths.testing_dir .. "/mock-server.lua &", true, test_env.env_variables) | 54 | local final_command = test_env.execute_helper(testing_paths.lua .. " " .. testing_paths.testing_dir .. "/mock-server.lua &", true, test_env.env_variables) |
| 58 | os.execute(final_command) | 55 | os.execute(final_command) |
| 59 | end) | 56 | end) |
