Commit db779388fee09b14ee591d9cb4981bdae3d23be9
Exists in
spb-stable
and in
2 other branches
Merge pull request #7075 from jvanbaarsen/split-spinach-tests
Splitted the Spinach tests to prevent time-outs
Showing
28 changed files
with
51 additions
and
2 deletions
Show diff stats
.travis.yml
@@ -3,12 +3,14 @@ env: | @@ -3,12 +3,14 @@ env: | ||
3 | global: | 3 | global: |
4 | - TRAVIS=true | 4 | - TRAVIS=true |
5 | matrix: | 5 | matrix: |
6 | - - TASK=spinach DB=mysql | 6 | + - TASK=spinach_project DB=mysql |
7 | + - TASK=spinach_other DB=mysql | ||
7 | - TASK=spec:api DB=mysql | 8 | - TASK=spec:api DB=mysql |
8 | - TASK=spec:feature DB=mysql | 9 | - TASK=spec:feature DB=mysql |
9 | - TASK=spec:other DB=mysql | 10 | - TASK=spec:other DB=mysql |
10 | - TASK=jasmine:ci DB=mysql | 11 | - TASK=jasmine:ci DB=mysql |
11 | - - TASK=spinach DB=postgresql | 12 | + - TASK=spinach_project DB=postgresql |
13 | + - TASK=spinach_other DB=postgresql | ||
12 | - TASK=spec:api DB=postgresql | 14 | - TASK=spec:api DB=postgresql |
13 | - TASK=spec:feature DB=postgresql | 15 | - TASK=spec:feature DB=postgresql |
14 | - TASK=spec:other DB=postgresql | 16 | - TASK=spec:other DB=postgresql |
features/admin/active_tab.feature
features/admin/broadcast_messages.feature
features/admin/groups.feature
features/admin/logs.feature
features/admin/projects.feature
features/admin/users.feature
features/dashboard/active_tab.feature
features/dashboard/archived_projects.feature
features/dashboard/dashboard.feature
features/dashboard/event_filters.feature
features/dashboard/help.feature
features/dashboard/issues.feature
features/dashboard/merge_requests.feature
features/dashboard/projects.feature
features/dashboard/search.feature
features/profile/active_tab.feature
features/profile/emails.feature
features/profile/group.feature
features/profile/notifications.feature
features/profile/profile.feature
features/profile/ssh_keys.feature
features/public/projects.feature
features/public/public_groups.feature
features/snippets/discover.feature
features/snippets/snippets.feature
features/snippets/user.feature
lib/tasks/spinach.rake
@@ -6,7 +6,28 @@ task :spinach do | @@ -6,7 +6,28 @@ task :spinach do | ||
6 | %W(rake gitlab:setup), | 6 | %W(rake gitlab:setup), |
7 | %W(spinach), | 7 | %W(spinach), |
8 | ] | 8 | ] |
9 | + run_commands(cmds) | ||
10 | +end | ||
11 | + | ||
12 | +desc "GITLAB | Run project spinach features" | ||
13 | +task :spinach_project do | ||
14 | + cmds = [ | ||
15 | + %W(rake gitlab:setup), | ||
16 | + %W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets), | ||
17 | + ] | ||
18 | + run_commands(cmds) | ||
19 | +end | ||
20 | + | ||
21 | +desc "GITLAB | Run other spinach features" | ||
22 | +task :spinach_other do | ||
23 | + cmds = [ | ||
24 | + %W(rake gitlab:setup), | ||
25 | + %W(spinach --tags @admin,@dashboard,@profile,@public,@snippets), | ||
26 | + ] | ||
27 | + run_commands(cmds) | ||
28 | +end | ||
9 | 29 | ||
30 | +def run_commands(cmds) | ||
10 | cmds.each do |cmd| | 31 | cmds.each do |cmd| |
11 | system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) or raise("#{cmd} failed!") | 32 | system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) or raise("#{cmd} failed!") |
12 | end | 33 | end |