diff options
author | roboo <robo.karasek@gmail.com> | 2016-07-18 17:35:40 +0200 |
---|---|---|
committer | roboo <robo.karasek@gmail.com> | 2016-07-18 17:35:40 +0200 |
commit | a90a2066b08b4cc047be84c673024f7f5e9fa054 (patch) | |
tree | 752e6e807bf1c34c676e07d02438f34994c473d0 /spec | |
parent | b04588031609c8cbcf3636f0dadb9fc6cd960c8f (diff) | |
download | luarocks-a90a2066b08b4cc047be84c673024f7f5e9fa054.tar.gz luarocks-a90a2066b08b4cc047be84c673024f7f5e9fa054.tar.bz2 luarocks-a90a2066b08b4cc047be84c673024f7f5e9fa054.zip |
Fix of upload tests for lua5.3
Diffstat (limited to 'spec')
-rw-r--r-- | spec/install_spec.lua | 4 | ||||
-rw-r--r-- | spec/make_spec.lua | 2 | ||||
-rw-r--r-- | spec/pack_spec.lua | 2 | ||||
-rw-r--r-- | spec/upload_spec.lua | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 0b2ffb53..28e349c3 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
@@ -83,14 +83,14 @@ describe("LuaRocks install tests #blackbox #b_install", function() | |||
83 | end) | 83 | end) |
84 | 84 | ||
85 | it("LuaRocks install only-deps of luasocket packed rock", function() | 85 | it("LuaRocks install only-deps of luasocket packed rock", function() |
86 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket")) | 86 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-1")) |
87 | local output = run.luarocks("install --only-deps " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock") | 87 | local output = run.luarocks("install --only-deps " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock") |
88 | assert.are.same(output, "Successfully installed dependencies for luasocket 3.0rc1-1") | 88 | assert.are.same(output, "Successfully installed dependencies for luasocket 3.0rc1-1") |
89 | assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | 89 | assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) |
90 | end) | 90 | end) |
91 | 91 | ||
92 | it("LuaRocks install reinstall", function() | 92 | it("LuaRocks install reinstall", function() |
93 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket")) | 93 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-1")) |
94 | assert.is_true(run.luarocks_bool("install " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | 94 | assert.is_true(run.luarocks_bool("install " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) |
95 | assert.is_true(run.luarocks_bool("install --deps-mode=none " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | 95 | assert.is_true(run.luarocks_bool("install --deps-mode=none " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) |
96 | assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | 96 | assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) |
diff --git a/spec/make_spec.lua b/spec/make_spec.lua index 2821c143..3e843f7b 100644 --- a/spec/make_spec.lua +++ b/spec/make_spec.lua | |||
@@ -27,7 +27,7 @@ describe("LuaRocks make tests #blackbox #b_make", function() | |||
27 | 27 | ||
28 | it("LuaRocks make with rockspec", function() | 28 | it("LuaRocks make with rockspec", function() |
29 | -- make luasocket | 29 | -- make luasocket |
30 | assert.is_true(run.luarocks_bool("download --source luasocket")) | 30 | assert.is_true(run.luarocks_bool("download --source luasocket 3.0rc1-1")) |
31 | assert.is_true(run.luarocks_bool("unpack luasocket-3.0rc1-1.src.rock")) | 31 | assert.is_true(run.luarocks_bool("unpack luasocket-3.0rc1-1.src.rock")) |
32 | lfs.chdir("luasocket-3.0rc1-1/luasocket-3.0-rc1/") | 32 | lfs.chdir("luasocket-3.0rc1-1/luasocket-3.0-rc1/") |
33 | assert.is_true(run.luarocks_bool("make luasocket-3.0rc1-1.rockspec")) | 33 | assert.is_true(run.luarocks_bool("make luasocket-3.0rc1-1.rockspec")) |
diff --git a/spec/pack_spec.lua b/spec/pack_spec.lua index 67ed5f3f..78aab9aa 100644 --- a/spec/pack_spec.lua +++ b/spec/pack_spec.lua | |||
@@ -52,7 +52,7 @@ describe("LuaRocks pack tests #blackbox #b_pack", function() | |||
52 | 52 | ||
53 | it("LuaRocks pack src", function() | 53 | it("LuaRocks pack src", function() |
54 | assert.is_true(run.luarocks_bool("install luasec")) | 54 | assert.is_true(run.luarocks_bool("install luasec")) |
55 | assert.is_true(run.luarocks_bool("download --rockspec luasocket")) | 55 | assert.is_true(run.luarocks_bool("download --rockspec luasocket 3.0rc1-1")) |
56 | assert.is_true(run.luarocks_bool("pack luasocket-3.0rc1-1.rockspec")) | 56 | assert.is_true(run.luarocks_bool("pack luasocket-3.0rc1-1.rockspec")) |
57 | assert.is_true(test_env.remove_files(lfs.currentdir(), "luasocket-")) | 57 | assert.is_true(test_env.remove_files(lfs.currentdir(), "luasocket-")) |
58 | end) | 58 | end) |
diff --git a/spec/upload_spec.lua b/spec/upload_spec.lua index d959f64a..02b68611 100644 --- a/spec/upload_spec.lua +++ b/spec/upload_spec.lua | |||
@@ -7,6 +7,7 @@ test_env.unload_luarocks() | |||
7 | local extra_rocks = { | 7 | local extra_rocks = { |
8 | "/lua-cjson-2.1.0-1.src.rock", | 8 | "/lua-cjson-2.1.0-1.src.rock", |
9 | 9 | ||
10 | -- rocks needed for mock-server | ||
10 | "/copas-2.0.1-1.src.rock", | 11 | "/copas-2.0.1-1.src.rock", |
11 | "/coxpcall-1.16.0-1.src.rock", | 12 | "/coxpcall-1.16.0-1.src.rock", |
12 | "/dkjson-2.5-2.src.rock", | 13 | "/dkjson-2.5-2.src.rock", |
@@ -50,7 +51,7 @@ describe("LuaRocks upload tests #blackbox #b_upload", function() | |||
50 | assert.is_true(run.luarocks_bool("install lua-cjson")) | 51 | assert.is_true(run.luarocks_bool("install lua-cjson")) |
51 | end) | 52 | end) |
52 | 53 | ||
53 | describe("LuaRocks upload tests with Xavante server", function() | 54 | describe("LuaRocks upload tests with Xavante server #mock", function() |
54 | before_each(function() | 55 | before_each(function() |
55 | assert.is_true(test_env.need_rock("restserver-xavante")) | 56 | assert.is_true(test_env.need_rock("restserver-xavante")) |
56 | local final_command = test_env.execute_helper(testing_paths.lua .. " " .. testing_paths.testing_dir .. "/mock-server.lua &", true, test_env.env_variables) | 57 | local final_command = test_env.execute_helper(testing_paths.lua .. " " .. testing_paths.testing_dir .. "/mock-server.lua &", true, test_env.env_variables) |