diff options
author | George Roman <george.roman.99@gmail.com> | 2018-06-01 00:05:49 +0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-04 15:41:51 -0300 |
commit | 4e8c650d7daac769f9af843b1578dd2521318972 (patch) | |
tree | b508db3fe4ce0fa7e6436b8f8866da31c579d663 | |
parent | 6334c894b2b3d1943edd4902bcd42883ced0915b (diff) | |
download | luarocks-4e8c650d7daac769f9af843b1578dd2521318972.tar.gz luarocks-4e8c650d7daac769f9af843b1578dd2521318972.tar.bz2 luarocks-4e8c650d7daac769f9af843b1578dd2521318972.zip |
Tests: replace #blackbox with #integration and #whitebox with #unit
-rw-r--r-- | spec/add_spec.lua | 2 | ||||
-rw-r--r-- | spec/build_spec.lua | 2 | ||||
-rw-r--r-- | spec/config_spec.lua | 2 | ||||
-rw-r--r-- | spec/deps_spec.lua | 2 | ||||
-rw-r--r-- | spec/doc_spec.lua | 4 | ||||
-rw-r--r-- | spec/download_spec.lua | 2 | ||||
-rw-r--r-- | spec/fetch_spec.lua | 17 | ||||
-rw-r--r-- | spec/fs_spec.lua | 2 | ||||
-rw-r--r-- | spec/fun_spec.lua | 2 | ||||
-rw-r--r-- | spec/help_spec.lua | 2 | ||||
-rw-r--r-- | spec/install_spec.lua | 2 | ||||
-rw-r--r-- | spec/lint_spec.lua | 2 | ||||
-rw-r--r-- | spec/list_spec.lua | 2 | ||||
-rw-r--r-- | spec/make_manifest_spec.lua | 2 | ||||
-rw-r--r-- | spec/make_spec.lua | 2 | ||||
-rw-r--r-- | spec/new_version_spec.lua | 2 | ||||
-rw-r--r-- | spec/pack_spec.lua | 4 | ||||
-rw-r--r-- | spec/path_spec.lua | 2 | ||||
-rw-r--r-- | spec/persist_spec.lua (renamed from spec/persist.lua) | 2 | ||||
-rw-r--r-- | spec/purge_spec.lua | 4 | ||||
-rw-r--r-- | spec/refresh_cache_spec.lua | 2 | ||||
-rw-r--r-- | spec/remove_spec.lua | 2 | ||||
-rw-r--r-- | spec/search_spec.lua | 2 | ||||
-rw-r--r-- | spec/show_spec.lua | 2 | ||||
-rw-r--r-- | spec/test_spec.lua | 2 | ||||
-rw-r--r-- | spec/unpack_spec.lua | 4 | ||||
-rw-r--r-- | spec/upload_spec.lua | 3 | ||||
-rw-r--r-- | spec/util_spec.lua | 4 | ||||
-rw-r--r-- | spec/write_rockspec_spec.lua | 2 | ||||
-rw-r--r-- | test/README.md | 29 |
30 files changed, 44 insertions, 69 deletions
diff --git a/spec/add_spec.lua b/spec/add_spec.lua index 1bc9e2a3..394b8f8a 100644 --- a/spec/add_spec.lua +++ b/spec/add_spec.lua | |||
@@ -9,7 +9,7 @@ local extra_rocks = { | |||
9 | "/luasocket-3.0rc1-2.rockspec" | 9 | "/luasocket-3.0rc1-2.rockspec" |
10 | } | 10 | } |
11 | 11 | ||
12 | describe("LuaRocks add tests #blackbox #b_add", function() | 12 | describe("LuaRocks add tests #integration", function() |
13 | 13 | ||
14 | before_each(function() | 14 | before_each(function() |
15 | test_env.setup_specs(extra_rocks) | 15 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/build_spec.lua b/spec/build_spec.lua index 2e7333b3..5f1eefd0 100644 --- a/spec/build_spec.lua +++ b/spec/build_spec.lua | |||
@@ -28,7 +28,7 @@ local extra_rocks = { | |||
28 | "/validate-args-1.5.4-1.rockspec" | 28 | "/validate-args-1.5.4-1.rockspec" |
29 | } | 29 | } |
30 | 30 | ||
31 | describe("LuaRocks build tests #blackbox #b_build", function() | 31 | describe("LuaRocks build tests #integration", function() |
32 | 32 | ||
33 | before_each(function() | 33 | before_each(function() |
34 | test_env.setup_specs(extra_rocks) | 34 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/config_spec.lua b/spec/config_spec.lua index fae68474..94757244 100644 --- a/spec/config_spec.lua +++ b/spec/config_spec.lua | |||
@@ -7,7 +7,7 @@ local site_config | |||
7 | 7 | ||
8 | test_env.unload_luarocks() | 8 | test_env.unload_luarocks() |
9 | 9 | ||
10 | describe("LuaRocks config tests #blackbox #b_config", function() | 10 | describe("LuaRocks config tests #integration", function() |
11 | 11 | ||
12 | before_each(function() | 12 | before_each(function() |
13 | test_env.setup_specs() | 13 | test_env.setup_specs() |
diff --git a/spec/deps_spec.lua b/spec/deps_spec.lua index 67c1335f..846434f4 100644 --- a/spec/deps_spec.lua +++ b/spec/deps_spec.lua | |||
@@ -13,7 +13,7 @@ local extra_rocks = { | |||
13 | "/lpeg-1.0.0-1.src.rock", | 13 | "/lpeg-1.0.0-1.src.rock", |
14 | } | 14 | } |
15 | 15 | ||
16 | describe("LuaRocks deps tests #blackbox #b_deps", function() | 16 | describe("LuaRocks deps tests #integration", function() |
17 | 17 | ||
18 | before_each(function() | 18 | before_each(function() |
19 | test_env.setup_specs(extra_rocks) | 19 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/doc_spec.lua b/spec/doc_spec.lua index 6d91fc00..c7cacc94 100644 --- a/spec/doc_spec.lua +++ b/spec/doc_spec.lua | |||
@@ -9,7 +9,7 @@ local extra_rocks = { | |||
9 | "/c3-1.0-1.src.rock" | 9 | "/c3-1.0-1.src.rock" |
10 | } | 10 | } |
11 | 11 | ||
12 | describe("LuaRocks doc tests #blackbox #b_doc", function() | 12 | describe("LuaRocks doc tests #integration", function() |
13 | 13 | ||
14 | before_each(function() | 14 | before_each(function() |
15 | test_env.setup_specs(extra_rocks) | 15 | test_env.setup_specs(extra_rocks) |
@@ -75,5 +75,3 @@ describe("LuaRocks doc tests #blackbox #b_doc", function() | |||
75 | end) | 75 | end) |
76 | end) | 76 | end) |
77 | end) | 77 | end) |
78 | |||
79 | |||
diff --git a/spec/download_spec.lua b/spec/download_spec.lua index 152470a5..39f5b056 100644 --- a/spec/download_spec.lua +++ b/spec/download_spec.lua | |||
@@ -9,7 +9,7 @@ local extra_rocks = { | |||
9 | "/validate-args-1.5.4-1.rockspec" | 9 | "/validate-args-1.5.4-1.rockspec" |
10 | } | 10 | } |
11 | 11 | ||
12 | describe("LuaRocks download tests #blackbox #b_download", function() | 12 | describe("LuaRocks download tests #integration", function() |
13 | 13 | ||
14 | before_each(function() | 14 | before_each(function() |
15 | test_env.setup_specs(extra_rocks) | 15 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/fetch_spec.lua b/spec/fetch_spec.lua index c98a3de3..fa614349 100644 --- a/spec/fetch_spec.lua +++ b/spec/fetch_spec.lua | |||
@@ -8,11 +8,10 @@ local lfs = require("lfs") | |||
8 | local testing_paths = test_env.testing_paths | 8 | local testing_paths = test_env.testing_paths |
9 | local get_tmp_path = test_env.get_tmp_path | 9 | local get_tmp_path = test_env.get_tmp_path |
10 | 10 | ||
11 | describe("Luarocks fetch test #blackbox #b_fetch", function() | 11 | describe("Luarocks fetch test #unit", function() |
12 | local are_same_files = function(file1, file2) | 12 | local are_same_files = function(file1, file2) |
13 | return file1 == file2 or lfs.attributes(file1).ino == lfs.attributes(file2).ino | 13 | return file1 == file2 or lfs.attributes(file1).ino == lfs.attributes(file2).ino |
14 | end | 14 | end |
15 | |||
16 | 15 | ||
17 | describe("fetch.is_basic_protocol", function() | 16 | describe("fetch.is_basic_protocol", function() |
18 | it("checks whether the arguments represent a valid protocol and returns the result of the check", function() | 17 | it("checks whether the arguments represent a valid protocol and returns the result of the check", function() |
@@ -25,7 +24,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function() | |||
25 | end) | 24 | end) |
26 | end) | 25 | end) |
27 | 26 | ||
28 | describe("fetch.fetch_url", function() | 27 | describe("fetch.fetch_url #mock", function() |
29 | setup(function() | 28 | setup(function() |
30 | test_env.mock_server_init() | 29 | test_env.mock_server_init() |
31 | end) | 30 | end) |
@@ -61,7 +60,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function() | |||
61 | end) | 60 | end) |
62 | end) | 61 | end) |
63 | 62 | ||
64 | describe("fetch.fetch_url_at_temp_dir", function() | 63 | describe("fetch.fetch_url_at_temp_dir #mock", function() |
65 | local tmpfile | 64 | local tmpfile |
66 | local tmpdir | 65 | local tmpdir |
67 | 66 | ||
@@ -129,7 +128,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function() | |||
129 | end) | 128 | end) |
130 | end) | 129 | end) |
131 | 130 | ||
132 | describe("fetch.find_base_dir", function() | 131 | describe("fetch.find_base_dir #mock", function() |
133 | setup(function() | 132 | setup(function() |
134 | test_env.mock_server_init() | 133 | test_env.mock_server_init() |
135 | end) | 134 | end) |
@@ -160,7 +159,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function() | |||
160 | end) | 159 | end) |
161 | end) | 160 | end) |
162 | 161 | ||
163 | describe("fetch.fetch_and_unpack_rock", function() | 162 | describe("fetch.fetch_and_unpack_rock #mock", function() |
164 | local tmpdir | 163 | local tmpdir |
165 | 164 | ||
166 | after_each(function() | 165 | after_each(function() |
@@ -271,7 +270,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function() | |||
271 | end) | 270 | end) |
272 | end) | 271 | end) |
273 | 272 | ||
274 | describe("fetch.load_rockspec", function() | 273 | describe("fetch.load_rockspec #mock", function() |
275 | setup(function() | 274 | setup(function() |
276 | test_env.mock_server_init() | 275 | test_env.mock_server_init() |
277 | end) | 276 | end) |
@@ -318,7 +317,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function() | |||
318 | end) | 317 | end) |
319 | end) | 318 | end) |
320 | 319 | ||
321 | describe("fetch.get_sources", function() | 320 | describe("fetch.get_sources #mock", function() |
322 | setup(function() | 321 | setup(function() |
323 | test_env.mock_server_init() | 322 | test_env.mock_server_init() |
324 | end) | 323 | end) |
diff --git a/spec/fs_spec.lua b/spec/fs_spec.lua index b250e321..c0679b34 100644 --- a/spec/fs_spec.lua +++ b/spec/fs_spec.lua | |||
@@ -8,7 +8,7 @@ local posix_ok = pcall(require, "posix") | |||
8 | local testing_paths = test_env.testing_paths | 8 | local testing_paths = test_env.testing_paths |
9 | local get_tmp_path = test_env.get_tmp_path | 9 | local get_tmp_path = test_env.get_tmp_path |
10 | 10 | ||
11 | describe("Luarocks fs test #whitebox #w_fs", function() | 11 | describe("Luarocks fs test #unit", function() |
12 | local exists_file = function(path) | 12 | local exists_file = function(path) |
13 | local ok, err, code = os.rename(path, path) | 13 | local ok, err, code = os.rename(path, path) |
14 | if not ok and code == 13 then | 14 | if not ok and code == 13 then |
diff --git a/spec/fun_spec.lua b/spec/fun_spec.lua index b5bed0da..259a3148 100644 --- a/spec/fun_spec.lua +++ b/spec/fun_spec.lua | |||
@@ -3,7 +3,7 @@ local fun = require("luarocks.fun") | |||
3 | 3 | ||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | 5 | ||
6 | describe("LuaRocks fun tests", function() | 6 | describe("LuaRocks fun tests #unit", function() |
7 | describe("fun.concat", function() | 7 | describe("fun.concat", function() |
8 | it("returns the concatenation of the two tables given as arguments", function() | 8 | it("returns the concatenation of the two tables given as arguments", function() |
9 | local t1, t2 | 9 | local t1, t2 |
diff --git a/spec/help_spec.lua b/spec/help_spec.lua index f7bb79b3..93b89ce7 100644 --- a/spec/help_spec.lua +++ b/spec/help_spec.lua | |||
@@ -3,7 +3,7 @@ local run = test_env.run | |||
3 | 3 | ||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | 5 | ||
6 | describe("LuaRocks help tests #blackbox #b_help", function() | 6 | describe("LuaRocks help tests #integration", function() |
7 | 7 | ||
8 | before_each(function() | 8 | before_each(function() |
9 | test_env.setup_specs() | 9 | test_env.setup_specs() |
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index b4273692..3525cda3 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
@@ -27,7 +27,7 @@ local extra_rocks = { | |||
27 | "/sailor-0.5-4.src.rock", | 27 | "/sailor-0.5-4.src.rock", |
28 | } | 28 | } |
29 | 29 | ||
30 | describe("luarocks install #blackbox #b_install", function() | 30 | describe("luarocks install #integration", function() |
31 | 31 | ||
32 | before_each(function() | 32 | before_each(function() |
33 | test_env.setup_specs(extra_rocks) | 33 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/lint_spec.lua b/spec/lint_spec.lua index 1c082b2a..e7af97fa 100644 --- a/spec/lint_spec.lua +++ b/spec/lint_spec.lua | |||
@@ -8,7 +8,7 @@ local extra_rocks = { | |||
8 | "/validate-args-1.5.4-1.rockspec" | 8 | "/validate-args-1.5.4-1.rockspec" |
9 | } | 9 | } |
10 | 10 | ||
11 | describe("LuaRocks lint tests #blackbox #b_lint", function() | 11 | describe("LuaRocks lint tests #integration", function() |
12 | 12 | ||
13 | before_each(function() | 13 | before_each(function() |
14 | test_env.setup_specs(extra_rocks) | 14 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/list_spec.lua b/spec/list_spec.lua index e4bb7b45..9cf4f0a8 100644 --- a/spec/list_spec.lua +++ b/spec/list_spec.lua | |||
@@ -9,7 +9,7 @@ local extra_rocks = { | |||
9 | "/say-1.2-1.src.rock" | 9 | "/say-1.2-1.src.rock" |
10 | } | 10 | } |
11 | 11 | ||
12 | describe("LuaRocks list tests #blackbox #b_list", function() | 12 | describe("LuaRocks list tests #integration", function() |
13 | 13 | ||
14 | before_each(function() | 14 | before_each(function() |
15 | test_env.setup_specs(extra_rocks) | 15 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/make_manifest_spec.lua b/spec/make_manifest_spec.lua index 2b109fa7..a33b1f5b 100644 --- a/spec/make_manifest_spec.lua +++ b/spec/make_manifest_spec.lua | |||
@@ -3,7 +3,7 @@ local run = test_env.run | |||
3 | 3 | ||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | 5 | ||
6 | describe("LuaRocks make_manifest tests #blackbox #b_make_manifest", function() | 6 | describe("LuaRocks make_manifest tests #integration", function() |
7 | 7 | ||
8 | before_each(function() | 8 | before_each(function() |
9 | test_env.setup_specs() | 9 | test_env.setup_specs() |
diff --git a/spec/make_spec.lua b/spec/make_spec.lua index bb219b68..6df0ab23 100644 --- a/spec/make_spec.lua +++ b/spec/make_spec.lua | |||
@@ -14,7 +14,7 @@ local extra_rocks = { | |||
14 | "/lxsh-0.8.6-2.rockspec" | 14 | "/lxsh-0.8.6-2.rockspec" |
15 | } | 15 | } |
16 | 16 | ||
17 | describe("LuaRocks make tests #blackbox #b_make", function() | 17 | describe("LuaRocks make tests #integration", function() |
18 | 18 | ||
19 | before_each(function() | 19 | before_each(function() |
20 | test_env.setup_specs(extra_rocks) | 20 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/new_version_spec.lua b/spec/new_version_spec.lua index f3bb007e..22506d3c 100644 --- a/spec/new_version_spec.lua +++ b/spec/new_version_spec.lua | |||
@@ -10,7 +10,7 @@ local extra_rocks = { | |||
10 | "/lpeg-0.12-1.rockspec" | 10 | "/lpeg-0.12-1.rockspec" |
11 | } | 11 | } |
12 | 12 | ||
13 | describe("LuaRocks new_version tests #blackbox #b_new_version", function() | 13 | describe("LuaRocks new_version tests #integration", function() |
14 | 14 | ||
15 | setup(function() | 15 | setup(function() |
16 | test_env.setup_specs(extra_rocks) | 16 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/pack_spec.lua b/spec/pack_spec.lua index 8fbade44..08647cfb 100644 --- a/spec/pack_spec.lua +++ b/spec/pack_spec.lua | |||
@@ -14,7 +14,7 @@ local extra_rocks = { | |||
14 | "/say-1.0-1.src.rock" | 14 | "/say-1.0-1.src.rock" |
15 | } | 15 | } |
16 | 16 | ||
17 | describe("LuaRocks pack #blackbox #b_pack", function() | 17 | describe("LuaRocks pack #integration", function() |
18 | 18 | ||
19 | before_each(function() | 19 | before_each(function() |
20 | test_env.setup_specs(extra_rocks) | 20 | test_env.setup_specs(extra_rocks) |
@@ -93,5 +93,3 @@ describe("LuaRocks pack #blackbox #b_pack", function() | |||
93 | end) | 93 | end) |
94 | 94 | ||
95 | end) | 95 | end) |
96 | |||
97 | |||
diff --git a/spec/path_spec.lua b/spec/path_spec.lua index bbc0cfc8..0b115d5c 100644 --- a/spec/path_spec.lua +++ b/spec/path_spec.lua | |||
@@ -3,7 +3,7 @@ local run = test_env.run | |||
3 | 3 | ||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | 5 | ||
6 | describe("LuaRocks path tests #blackbox #b_path", function() | 6 | describe("LuaRocks path tests #integration", function() |
7 | before_each(function() | 7 | before_each(function() |
8 | test_env.setup_specs() | 8 | test_env.setup_specs() |
9 | end) | 9 | end) |
diff --git a/spec/persist.lua b/spec/persist_spec.lua index 00a9b75d..f61c7176 100644 --- a/spec/persist.lua +++ b/spec/persist_spec.lua | |||
@@ -3,7 +3,7 @@ local test_env = require("spec.util.test_env") | |||
3 | test_env.unload_luarocks() | 3 | test_env.unload_luarocks() |
4 | local persist = require("luarocks.persist") | 4 | local persist = require("luarocks.persist") |
5 | 5 | ||
6 | describe("Luarocks persist test #whitebox #w_persist", function() | 6 | describe("Luarocks persist test #unit", function() |
7 | describe("persist.save_from_table_to_string", function() | 7 | describe("persist.save_from_table_to_string", function() |
8 | it("simple table", function() | 8 | it("simple table", function() |
9 | assert.are.same([[ | 9 | assert.are.same([[ |
diff --git a/spec/purge_spec.lua b/spec/purge_spec.lua index 79ad0dfd..18445b60 100644 --- a/spec/purge_spec.lua +++ b/spec/purge_spec.lua | |||
@@ -8,7 +8,7 @@ local extra_rocks = { | |||
8 | "/say-1.0-1.src.rock", | 8 | "/say-1.0-1.src.rock", |
9 | } | 9 | } |
10 | 10 | ||
11 | describe("LuaRocks purge tests #blackbox #b_purge", function() | 11 | describe("LuaRocks purge tests #integration", function() |
12 | before_each(function() | 12 | before_each(function() |
13 | test_env.setup_specs(extra_rocks) | 13 | test_env.setup_specs(extra_rocks) |
14 | end) | 14 | end) |
@@ -34,5 +34,3 @@ describe("LuaRocks purge tests #blackbox #b_purge", function() | |||
34 | end) | 34 | end) |
35 | end) | 35 | end) |
36 | end) | 36 | end) |
37 | |||
38 | |||
diff --git a/spec/refresh_cache_spec.lua b/spec/refresh_cache_spec.lua index 51c1572f..9bf0361c 100644 --- a/spec/refresh_cache_spec.lua +++ b/spec/refresh_cache_spec.lua | |||
@@ -3,7 +3,7 @@ local run = test_env.run | |||
3 | 3 | ||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | 5 | ||
6 | describe("LuaRocks refresh_cache tests #blackbox #b_refresh_cache", function() | 6 | describe("LuaRocks refresh_cache tests #integration", function() |
7 | 7 | ||
8 | before_each(function() | 8 | before_each(function() |
9 | test_env.setup_specs() | 9 | test_env.setup_specs() |
diff --git a/spec/remove_spec.lua b/spec/remove_spec.lua index 10ab012d..55264a75 100644 --- a/spec/remove_spec.lua +++ b/spec/remove_spec.lua | |||
@@ -12,7 +12,7 @@ local extra_rocks = { | |||
12 | "/luasocket-3.0rc1-2.rockspec" | 12 | "/luasocket-3.0rc1-2.rockspec" |
13 | } | 13 | } |
14 | 14 | ||
15 | describe("LuaRocks remove tests #blackbox #b_remove", function() | 15 | describe("LuaRocks remove tests #integration", function() |
16 | 16 | ||
17 | before_each(function() | 17 | before_each(function() |
18 | test_env.setup_specs(extra_rocks) | 18 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/search_spec.lua b/spec/search_spec.lua index 952458dd..90efb552 100644 --- a/spec/search_spec.lua +++ b/spec/search_spec.lua | |||
@@ -7,7 +7,7 @@ local extra_rocks = { | |||
7 | "/lzlib-0.4.1.53-1.src.rock" | 7 | "/lzlib-0.4.1.53-1.src.rock" |
8 | } | 8 | } |
9 | 9 | ||
10 | describe("LuaRocks search tests #blackbox #b_search", function() | 10 | describe("LuaRocks search tests #integration", function() |
11 | 11 | ||
12 | before_each(function() | 12 | before_each(function() |
13 | test_env.setup_specs(extra_rocks) | 13 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/show_spec.lua b/spec/show_spec.lua index a3f856fd..a721a692 100644 --- a/spec/show_spec.lua +++ b/spec/show_spec.lua | |||
@@ -4,7 +4,7 @@ local testing_paths = test_env.testing_paths | |||
4 | 4 | ||
5 | test_env.unload_luarocks() | 5 | test_env.unload_luarocks() |
6 | 6 | ||
7 | describe("LuaRocks show #blackbox #b_show", function() | 7 | describe("LuaRocks show #integration", function() |
8 | 8 | ||
9 | before_each(function() | 9 | before_each(function() |
10 | test_env.setup_specs() | 10 | test_env.setup_specs() |
diff --git a/spec/test_spec.lua b/spec/test_spec.lua index 81dc5318..ffcf2ac0 100644 --- a/spec/test_spec.lua +++ b/spec/test_spec.lua | |||
@@ -18,7 +18,7 @@ local extra_rocks = { | |||
18 | "/mediator_lua-1.1.2-0.rockspec", | 18 | "/mediator_lua-1.1.2-0.rockspec", |
19 | } | 19 | } |
20 | 20 | ||
21 | describe("luarocks test #blackbox #b_test", function() | 21 | describe("luarocks test #integration", function() |
22 | 22 | ||
23 | before_each(function() | 23 | before_each(function() |
24 | test_env.setup_specs(extra_rocks) | 24 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/unpack_spec.lua b/spec/unpack_spec.lua index fc02d853..1eb40f59 100644 --- a/spec/unpack_spec.lua +++ b/spec/unpack_spec.lua | |||
@@ -10,7 +10,7 @@ local extra_rocks = { | |||
10 | "/luazip-1.2.4-1.rockspec" | 10 | "/luazip-1.2.4-1.rockspec" |
11 | } | 11 | } |
12 | 12 | ||
13 | describe("LuaRocks unpack tests #blackbox #b_unpack", function() | 13 | describe("LuaRocks unpack tests #integration", function() |
14 | 14 | ||
15 | before_each(function() | 15 | before_each(function() |
16 | test_env.setup_specs(extra_rocks) | 16 | test_env.setup_specs(extra_rocks) |
@@ -68,5 +68,3 @@ describe("LuaRocks unpack tests #blackbox #b_unpack", function() | |||
68 | end) | 68 | end) |
69 | end) | 69 | end) |
70 | end) | 70 | end) |
71 | |||
72 | |||
diff --git a/spec/upload_spec.lua b/spec/upload_spec.lua index a54f21c5..abf2e43d 100644 --- a/spec/upload_spec.lua +++ b/spec/upload_spec.lua | |||
@@ -4,7 +4,7 @@ local testing_paths = test_env.testing_paths | |||
4 | 4 | ||
5 | test_env.unload_luarocks() | 5 | test_env.unload_luarocks() |
6 | 6 | ||
7 | describe("LuaRocks upload tests #blackbox #b_upload", function() | 7 | describe("LuaRocks upload tests #integration", function() |
8 | 8 | ||
9 | before_each(function() | 9 | before_each(function() |
10 | test_env.setup_specs() | 10 | test_env.setup_specs() |
@@ -44,4 +44,3 @@ describe("LuaRocks upload tests #blackbox #b_upload", function() | |||
44 | end) | 44 | end) |
45 | end) | 45 | end) |
46 | end) | 46 | end) |
47 | |||
diff --git a/spec/util_spec.lua b/spec/util_spec.lua index 209dae6f..ce309138 100644 --- a/spec/util_spec.lua +++ b/spec/util_spec.lua | |||
@@ -4,7 +4,7 @@ local run = test_env.run | |||
4 | local testing_paths = test_env.testing_paths | 4 | local testing_paths = test_env.testing_paths |
5 | local env_variables = test_env.env_variables | 5 | local env_variables = test_env.env_variables |
6 | 6 | ||
7 | describe("Basic tests #blackbox #b_util", function() | 7 | describe("Basic tests #integration", function() |
8 | 8 | ||
9 | before_each(function() | 9 | before_each(function() |
10 | test_env.setup_specs() | 10 | test_env.setup_specs() |
@@ -73,7 +73,7 @@ end) | |||
73 | test_env.unload_luarocks() | 73 | test_env.unload_luarocks() |
74 | local util = require("luarocks.util") | 74 | local util = require("luarocks.util") |
75 | 75 | ||
76 | describe("Luarocks util test #whitebox #w_util", function() | 76 | describe("Luarocks util test #unit", function() |
77 | describe("util.sortedpairs", function() | 77 | describe("util.sortedpairs", function() |
78 | local function collect(iter, state, var) | 78 | local function collect(iter, state, var) |
79 | local collected = {} | 79 | local collected = {} |
diff --git a/spec/write_rockspec_spec.lua b/spec/write_rockspec_spec.lua index 95dc87ff..295eaa6b 100644 --- a/spec/write_rockspec_spec.lua +++ b/spec/write_rockspec_spec.lua | |||
@@ -3,7 +3,7 @@ local git_repo = require("spec.util.git_repo") | |||
3 | local lfs = require("lfs") | 3 | local lfs = require("lfs") |
4 | local run = test_env.run | 4 | local run = test_env.run |
5 | 5 | ||
6 | describe("LuaRocks write_rockspec tests #blackbox #b_write_rockspec", function() | 6 | describe("LuaRocks write_rockspec tests #integration", function() |
7 | 7 | ||
8 | before_each(function() | 8 | before_each(function() |
9 | test_env.setup_specs() | 9 | test_env.setup_specs() |
diff --git a/test/README.md b/test/README.md index 8124a800..770d7083 100644 --- a/test/README.md +++ b/test/README.md | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | Test suite for LuaRocks project with Busted unit testing framework(http://olivinelabs.com/busted/). | 6 | Test suite for LuaRocks project with Busted unit testing framework(http://olivinelabs.com/busted/). |
7 | 7 | ||
8 | * Contains white-box & black-box tests | 8 | * Contains unit & integration tests |
9 | * Easy setup for your purpose on command line or from configuration file | 9 | * Easy setup for your purpose on command line or from configuration file |
10 | 10 | ||
11 | ## Dependencies | 11 | ## Dependencies |
@@ -33,9 +33,9 @@ os=<version>, type your OS ["linux", "os x", "windows"] | |||
33 | --------------------------------------------------------------------------------------------- | 33 | --------------------------------------------------------------------------------------------- |
34 | ####_**Tags** of tests are required and are in this format:_ | 34 | ####_**Tags** of tests are required and are in this format:_ |
35 | 35 | ||
36 | **whitebox** - run all whitebox tests | 36 | **unit** - run all unit tests |
37 | 37 | ||
38 | **blackbox** - run all blackbox tests | 38 | **integration** - run all integration tests |
39 | 39 | ||
40 | **ssh** - run all tests which require ssh | 40 | **ssh** - run all tests which require ssh |
41 | 41 | ||
@@ -43,31 +43,16 @@ os=<version>, type your OS ["linux", "os x", "windows"] | |||
43 | 43 | ||
44 | **unix** - run all tests which are UNIX based, won't work on Windows systems | 44 | **unix** - run all tests which are UNIX based, won't work on Windows systems |
45 | 45 | ||
46 | **w**\_*name-of-command* - whitebox testing of command | ||
47 | |||
48 | **b**\_*name-of-command* - blackbox testing of command | ||
49 | |||
50 | for example: `b_install` or `w_help` | ||
51 | |||
52 | ## Examples | 46 | ## Examples |
53 | 47 | ||
54 | To run all tests: | 48 | To run all tests: |
55 | 49 | ||
56 | `busted` | 50 | `busted` |
57 | 51 | ||
58 | To run white-box tests in LuaRocks directory type : | 52 | To run unit tests in LuaRocks directory type : |
59 | |||
60 | `busted -t "whitebox"` | ||
61 | |||
62 | To run black-box tests just of *install* command (we defined our OS, so OS check is skipped.): | ||
63 | |||
64 | `busted -Xhelper os=linux -t "b_install"` | ||
65 | |||
66 | To run black-box tests of *install* command, whitebox of *help* command (using *full* type of environment): | ||
67 | |||
68 | `busted -Xhelper env=full -t "b_install", "w_help"` | ||
69 | 53 | ||
70 | To run black-box tests without tests, which use ssh: | 54 | `busted -t "unit"` |
71 | 55 | ||
72 | `busted -t "blackbox" --exclude-tags=ssh` | 56 | To run integration tests without tests which use ssh: |
73 | 57 | ||
58 | `busted -t "integration" --exclude-tags=ssh` | ||