Commit db779388fee09b14ee591d9cb4981bdae3d23be9

Authored by Dmitriy Zaporozhets
2 parents 08c3c065 e84057da

Merge pull request #7075 from jvanbaarsen/split-spinach-tests

Splitted the Spinach tests to prevent time-outs
@@ -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
  1 +@admin
1 Feature: Admin active tab 2 Feature: Admin active tab
2 Background: 3 Background:
3 Given I sign in as an admin 4 Given I sign in as an admin
features/admin/broadcast_messages.feature
  1 +@admin
1 Feature: Admin Broadcast Messages 2 Feature: Admin Broadcast Messages
2 Background: 3 Background:
3 Given I sign in as an admin 4 Given I sign in as an admin
features/admin/groups.feature
  1 +@admin
1 Feature: Admin Groups 2 Feature: Admin Groups
2 Background: 3 Background:
3 Given I sign in as an admin 4 Given I sign in as an admin
features/admin/logs.feature
  1 +@admin
1 Feature: Admin Logs 2 Feature: Admin Logs
2 Background: 3 Background:
3 Given I sign in as an admin 4 Given I sign in as an admin
features/admin/projects.feature
  1 +@admin
1 Feature: Admin Projects 2 Feature: Admin Projects
2 Background: 3 Background:
3 Given I sign in as an admin 4 Given I sign in as an admin
features/admin/users.feature
  1 +@admin
1 Feature: Admin Users 2 Feature: Admin Users
2 Background: 3 Background:
3 Given I sign in as an admin 4 Given I sign in as an admin
features/dashboard/active_tab.feature
  1 +@dashboard
1 Feature: Dashboard active tab 2 Feature: Dashboard active tab
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/dashboard/archived_projects.feature
  1 +@dashboard
1 Feature: Dashboard with archived projects 2 Feature: Dashboard with archived projects
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/dashboard/dashboard.feature
  1 +@dashboard
1 Feature: Dashboard 2 Feature: Dashboard
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/dashboard/event_filters.feature
  1 +@dashboard
1 Feature: Event filters 2 Feature: Event filters
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/dashboard/help.feature
  1 +@dashboard
1 Feature: Help 2 Feature: Help
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/dashboard/issues.feature
  1 +@dashboard
1 Feature: Dashboard Issues 2 Feature: Dashboard Issues
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/dashboard/merge_requests.feature
  1 +@dashboard
1 Feature: Dashboard Merge Requests 2 Feature: Dashboard Merge Requests
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/dashboard/projects.feature
  1 +@dashboard
1 Feature: Dashboard projects 2 Feature: Dashboard projects
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/dashboard/search.feature
  1 +@dashboard
1 Feature: Dashboard Search 2 Feature: Dashboard Search
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/profile/active_tab.feature
  1 +@profile
1 Feature: Profile active tab 2 Feature: Profile active tab
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/profile/emails.feature
  1 +@profile
1 Feature: Profile Emails 2 Feature: Profile Emails
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/profile/group.feature
  1 +@profile
1 Feature: Profile Group 2 Feature: Profile Group
2 Background: 3 Background:
3 Given I sign in as "John Doe" 4 Given I sign in as "John Doe"
features/profile/notifications.feature
  1 +@profile
1 Feature: Profile Notifications 2 Feature: Profile Notifications
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/profile/profile.feature
  1 +@profile
1 Feature: Profile 2 Feature: Profile
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/profile/ssh_keys.feature
  1 +@profile
1 Feature: Profile SSH Keys 2 Feature: Profile SSH Keys
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/public/projects.feature
  1 +@public
1 Feature: Public Projects Feature 2 Feature: Public Projects Feature
2 Background: 3 Background:
3 Given public project "Community" 4 Given public project "Community"
features/public/public_groups.feature
  1 +@public
1 Feature: Public Projects Feature 2 Feature: Public Projects Feature
2 Background: 3 Background:
3 Given group "TestGroup" has private project "Enterprise" 4 Given group "TestGroup" has private project "Enterprise"
features/snippets/discover.feature
  1 +@snippets
1 Feature: Discover Snippets 2 Feature: Discover Snippets
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/snippets/snippets.feature
  1 +@snippets
1 Feature: Snippets Feature 2 Feature: Snippets Feature
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
features/snippets/user.feature
  1 +@snippets
1 Feature: User Snippets 2 Feature: User Snippets
2 Background: 3 Background:
3 Given I sign in as a user 4 Given I sign in as a user
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