aboutsummaryrefslogtreecommitdiff
path: root/spec/upload_spec.lua
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-07-11 01:15:41 -0300
committerHisham <hisham@gobolinux.org>2016-07-11 01:15:41 -0300
commit994a041b4f1348564f390f3f4d8ec040c8edb4b8 (patch)
tree128d264d86576e0b62225056769b7097a745b822 /spec/upload_spec.lua
parent41eccd4ca6fe51f8174dd43744e7a4bab4daf2cb (diff)
parent77b41dd05a870feeb519e930472133f63cf94317 (diff)
downloadluarocks-994a041b4f1348564f390f3f4d8ec040c8edb4b8.tar.gz
luarocks-994a041b4f1348564f390f3f4d8ec040c8edb4b8.tar.bz2
luarocks-994a041b4f1348564f390f3f4d8ec040c8edb4b8.zip
Merge branch 'master' of https://github.com/keplerproject/luarocks
Diffstat (limited to 'spec/upload_spec.lua')
-rw-r--r--spec/upload_spec.lua39
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/upload_spec.lua b/spec/upload_spec.lua
new file mode 100644
index 00000000..c10ef0e9
--- /dev/null
+++ b/spec/upload_spec.lua
@@ -0,0 +1,39 @@
1local test_env = require("test/test_environment")
2local run = test_env.run
3
4test_env.unload_luarocks()
5
6local extra_rocks = {
7 "/lua-cjson-2.1.0-1.src.rock"
8}
9
10describe("LuaRocks upload tests #blackbox #b_upload", function()
11
12 before_each(function()
13 test_env.setup_specs(extra_rocks)
14 end)
15
16 it("LuaRocks upload with no flags/arguments", function()
17 assert.is_false(run.luarocks_bool("upload"))
18 end)
19
20 it("LuaRocks upload invalid rockspec", function()
21 assert.is_false(run.luarocks_bool("upload invalid.rockspec"))
22 end)
23
24 it("LuaRocks upload api key invalid", function()
25 assert.is_false(run.luarocks_bool("upload --api-key=invalid invalid.rockspec"))
26 end)
27
28 it("LuaRocks upload api key invalid and skip-pack", function()
29 assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --skip-pack luacov-0.11.0-1.rockspec"))
30 end)
31
32 it("LuaRocks upload force", function()
33 assert.is_true(run.luarocks_bool("install lua-cjson"))
34 assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --force luacov-0.11.0-1.rockspec"))
35 assert.is_true(run.luarocks_bool("install lua-cjson"))
36 end)
37end)
38
39