Commit 8362026a authored by Jeroen van Baarsen's avatar Jeroen van Baarsen

Split feature tests out to different build job

parent 6d57acce
...@@ -5,10 +5,12 @@ env: ...@@ -5,10 +5,12 @@ env:
matrix: matrix:
- TASK=spinach DB=mysql - TASK=spinach DB=mysql
- TASK=spec:api DB=mysql - TASK=spec:api DB=mysql
- TASK=spec:feature DB=mysql
- TASK=spec:other DB=mysql - TASK=spec:other DB=mysql
- TASK=jasmine:ci DB=mysql - TASK=jasmine:ci DB=mysql
- TASK=spinach DB=postgresql - TASK=spinach DB=postgresql
- TASK=spec:api DB=postgresql - TASK=spec:api DB=postgresql
- TASK=spec:feature DB=postgresql
- TASK=spec:other DB=postgresql - TASK=spec:other DB=postgresql
- TASK=jasmine:ci DB=postgresql - TASK=jasmine:ci DB=postgresql
before_install: before_install:
......
Rake::Task["spec"].clear if Rake::Task.task_defined?('spec') Rake::Task["spec"].clear if Rake::Task.task_defined?('spec')
namespace :spec do namespace :spec do
desc 'GITLAB | Run feature specs' desc 'GITLAB | Run request specs'
task :api do task :api do
cmds = [ cmds = [
%W(rake gitlab:setup), %W(rake gitlab:setup),
...@@ -10,11 +10,20 @@ namespace :spec do ...@@ -10,11 +10,20 @@ namespace :spec do
run_commands(cmds) run_commands(cmds)
end end
desc 'GITLAB | Run feature specs'
task :feature do
cmds = [
%W(rake gitlab:setup),
%W(rspec spec --tag @feature)
]
run_commands(cmds)
end
desc 'GITLAB | Run other specs' desc 'GITLAB | Run other specs'
task :other do task :other do
cmds = [ cmds = [
%W(rake gitlab:setup), %W(rake gitlab:setup),
%W(rspec spec --tag ~@api) %W(rspec spec --tag ~@api --tag ~@feature)
] ]
run_commands(cmds) run_commands(cmds)
end end
......
require 'spec_helper' require 'spec_helper'
describe "Admin::Hooks" do describe "Admin::Hooks", feature: true do
before do before do
@project = create(:project) @project = create(:project)
login_as :admin login_as :admin
......
require 'spec_helper' require 'spec_helper'
describe "Admin::Projects" do describe "Admin::Projects", feature: true do
before do before do
@project = create(:project) @project = create(:project)
login_as :admin login_as :admin
......
require 'spec_helper' require 'spec_helper'
describe "Admin::Users" do describe "Admin::Users", feature: true do
before { login_as :admin } before { login_as :admin }
describe "GET /admin/users" do describe "GET /admin/users" do
......
require 'spec_helper' require 'spec_helper'
describe "Admin::Projects" do describe "Admin::Projects", feature: true do
describe "GET /admin/projects" do describe "GET /admin/projects" do
subject { admin_projects_path } subject { admin_projects_path }
......
require 'spec_helper' require 'spec_helper'
describe "Dashboard Issues Feed" do describe "Dashboard Issues Feed", feature: true do
describe "GET /issues" do describe "GET /issues" do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:project1) { create(:project) } let!(:project1) { create(:project) }
......
require 'spec_helper' require 'spec_helper'
describe "Dashboard Feed" do describe "Dashboard Feed", feature: true do
describe "GET /" do describe "GET /" do
let!(:user) { create(:user) } let!(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe "Issues Feed" do describe "Issues Feed", feature: true do
describe "GET /issues" do describe "GET /issues" do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:project) { create(:project) } let!(:project) { create(:project) }
......
require 'spec_helper' require 'spec_helper'
describe "GitLab Flavored Markdown", features: true do describe "GitLab Flavored Markdown", feature: true do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) } let(:issue) { create(:issue, project: project) }
let(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let(:merge_request) { create(:merge_request, source_project: project, target_project: project) }
......
require 'spec_helper' require 'spec_helper'
describe "Issues" do describe "Issues", feature: true do
let(:project) { create(:project) } let(:project) { create(:project) }
before do before do
......
require 'spec_helper' require 'spec_helper'
describe "On a merge request", js: true do describe "On a merge request", js: true, feature: true do
let!(:merge_request) { create(:merge_request, :simple) } let!(:merge_request) { create(:merge_request, :simple) }
let!(:project) { merge_request.source_project } let!(:project) { merge_request.source_project }
let!(:note) { create(:note_on_merge_request, :with_attachment, project: project) } let!(:note) { create(:note_on_merge_request, :with_attachment, project: project) }
......
require 'spec_helper' require 'spec_helper'
describe "Profile account page" do describe "Profile account page", feature: true do
before(:each) { enable_observers } before(:each) { enable_observers }
after(:each) {disable_observers} after(:each) {disable_observers}
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe "Projects" do describe "Projects", feature: true do
before(:each) { enable_observers } before(:each) { enable_observers }
after(:each) {disable_observers} after(:each) {disable_observers}
before { login_as :user } before { login_as :user }
......
require 'spec_helper' require 'spec_helper'
describe "Search" do describe "Search", feature: true do
before do before do
ActiveRecord::Base.observers.enable(:user_observer) ActiveRecord::Base.observers.enable(:user_observer)
login_as :user login_as :user
......
require 'spec_helper' require 'spec_helper'
describe "Dashboard access" do describe "Dashboard access", feature: true do
describe "GET /dashboard" do describe "GET /dashboard" do
subject { dashboard_path } subject { dashboard_path }
......
require 'spec_helper' require 'spec_helper'
describe "Group access" do describe "Group access", feature: true do
describe "GET /projects/new" do describe "GET /projects/new" do
it { new_group_path.should be_allowed_for :admin } it { new_group_path.should be_allowed_for :admin }
it { new_group_path.should be_allowed_for :user } it { new_group_path.should be_allowed_for :user }
......
require 'spec_helper' require 'spec_helper'
describe "Group with internal project access" do describe "Group with internal project access", feature: true do
describe "Group" do describe "Group" do
let(:group) { create(:group) } let(:group) { create(:group) }
......
require 'spec_helper' require 'spec_helper'
describe "Group access" do describe "Group access", feature: true do
describe "Group" do describe "Group" do
let(:group) { create(:group) } let(:group) { create(:group) }
......
require 'spec_helper' require 'spec_helper'
describe "Group with public project access" do describe "Group with public project access", feature: true do
describe "Group" do describe "Group" do
let(:group) { create(:group) } let(:group) { create(:group) }
......
require 'spec_helper' require 'spec_helper'
describe "Users Security" do describe "Users Security", feature: true do
describe "Project" do describe "Project" do
before do before do
@u1 = create(:user) @u1 = create(:user)
......
require 'spec_helper' require 'spec_helper'
describe "Internal Project Access" do describe "Internal Project Access", feature: true do
let(:project) { create(:project, :internal) } let(:project) { create(:project, :internal) }
let(:master) { create(:user) } let(:master) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe "Private Project Access" do describe "Private Project Access", feature: true do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:master) { create(:user) } let(:master) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe "Public Project Access" do describe "Public Project Access", feature: true do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:master) { create(:user) } let(:master) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe 'Users' do describe 'Users', feature: true do
describe "GET /users/sign_up" do describe "GET /users/sign_up" do
before do before do
Gitlab.config.gitlab.stub(:signup_enabled).and_return(true) Gitlab.config.gitlab.stub(:signup_enabled).and_return(true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment