Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
5dd2f36a
Commit
5dd2f36a
authored
Apr 11, 2014
by
Jeroen van Baarsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added API testing group
parent
25eadf0c
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
39 additions
and
37 deletions
+39
-37
lib/tasks/spec.rake
lib/tasks/spec.rake
+19
-17
spec/requests/api/api_helpers_spec.rb
spec/requests/api/api_helpers_spec.rb
+2
-2
spec/requests/api/branches_spec.rb
spec/requests/api/branches_spec.rb
+1
-1
spec/requests/api/commits_spec.rb
spec/requests/api/commits_spec.rb
+1
-1
spec/requests/api/files_spec.rb
spec/requests/api/files_spec.rb
+1
-1
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+1
-1
spec/requests/api/internal_spec.rb
spec/requests/api/internal_spec.rb
+1
-1
spec/requests/api/issues_spec.rb
spec/requests/api/issues_spec.rb
+1
-1
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+1
-1
spec/requests/api/milestones_spec.rb
spec/requests/api/milestones_spec.rb
+1
-1
spec/requests/api/namespaces_spec.rb
spec/requests/api/namespaces_spec.rb
+1
-1
spec/requests/api/notes_spec.rb
spec/requests/api/notes_spec.rb
+1
-1
spec/requests/api/project_hooks_spec.rb
spec/requests/api/project_hooks_spec.rb
+1
-1
spec/requests/api/project_members_spec.rb
spec/requests/api/project_members_spec.rb
+1
-1
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+1
-1
spec/requests/api/repositories_spec.rb
spec/requests/api/repositories_spec.rb
+1
-1
spec/requests/api/services_spec.rb
spec/requests/api/services_spec.rb
+1
-1
spec/requests/api/session_spec.rb
spec/requests/api/session_spec.rb
+1
-1
spec/requests/api/system_hooks_spec.rb
spec/requests/api/system_hooks_spec.rb
+1
-1
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+1
-1
No files found.
lib/tasks/spec.rake
View file @
5dd2f36a
namespace
:testing
do
desc
'GITLAB | Run model specs'
task
:models
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(rspec spec --tag @models)
]
run_commands
(
cmds
)
end
Rake
::
Task
[
"spec"
].
clear
if
Rake
::
Task
.
task_defined?
(
'spec'
)
namespace
:spec
do
desc
'GITLAB | Run feature specs'
task
:
features
do
task
:
api
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(rspec spec --tag @
features
)
%W(rspec spec --tag @
api
)
]
run_commands
(
cmds
)
end
...
...
@@ -21,15 +14,24 @@ namespace :testing do
task
:other
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(rspec spec --tag ~@
models --tag ~@features
)
%W(rspec spec --tag ~@
api
)
]
run_commands
(
cmds
)
end
end
desc
"GITLAB | Run specs"
task
:spec
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(rspec spec)
,
]
run_commands
(
cmds
)
end
def
run_commands
(
cmds
)
cmds
.
each
do
|
cmd
|
system
({
'RAILS_ENV'
=>
'test'
,
'force'
=>
'yes'
},
*
cmd
)
raise
"
#{
cmd
}
failed!"
unless
$?
.
exitstatus
.
zero?
end
def
run_commands
(
cmds
)
cmds
.
each
do
|
cmd
|
system
({
'RAILS_ENV'
=>
'test'
,
'force'
=>
'yes'
},
*
cmd
)
raise
"
#{
cmd
}
failed!"
unless
$?
.
exitstatus
.
zero?
end
end
spec/requests/api/api_helpers_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
do
describe
API
,
api:
true
do
include
API
::
APIHelpers
include
ApiHelpers
let
(
:user
)
{
create
(
:user
)
}
...
...
@@ -158,4 +158,4 @@ describe API do
sudo_identifier
.
should
==
' 123'
end
end
end
\ No newline at end of file
end
spec/requests/api/branches_spec.rb
View file @
5dd2f36a
require
'spec_helper'
require
'mime/types'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
enable_observers
}
after
(
:each
)
{
disable_observers
}
...
...
spec/requests/api/commits_spec.rb
View file @
5dd2f36a
require
'spec_helper'
require
'mime/types'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
enable_observers
}
after
(
:each
)
{
disable_observers
}
...
...
spec/requests/api/files_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
}
after
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
disable
(
:user_observer
)
}
...
...
spec/requests/api/groups_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
let
(
:user1
)
{
create
(
:user
)
}
...
...
spec/requests/api/internal_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
}
after
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
disable
(
:user_observer
)
}
...
...
spec/requests/api/issues_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
}
after
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
disable
(
:user_observer
)
}
...
...
spec/requests/api/merge_requests_spec.rb
View file @
5dd2f36a
require
"spec_helper"
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
}
after
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
disable
(
:user_observer
)
}
...
...
spec/requests/api/milestones_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
enable_observers
}
after
(
:each
)
{
disable_observers
}
...
...
spec/requests/api/namespaces_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
}
after
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
disable
(
:user_observer
)
}
...
...
spec/requests/api/notes_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
}
after
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
disable
(
:user_observer
)
}
...
...
spec/requests/api/project_hooks_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
,
'ProjectHooks'
do
describe
API
::
API
,
'ProjectHooks'
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
enable_observers
}
after
(
:each
)
{
disable_observers
}
...
...
spec/requests/api/project_members_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
enable_observers
}
after
(
:each
)
{
disable_observers
}
...
...
spec/requests/api/projects_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
enable_observers
}
after
(
:each
)
{
disable_observers
}
...
...
spec/requests/api/repositories_spec.rb
View file @
5dd2f36a
require
'spec_helper'
require
'mime/types'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
enable_observers
}
after
(
:each
)
{
disable_observers
}
...
...
spec/requests/api/services_spec.rb
View file @
5dd2f36a
require
"spec_helper"
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
before
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
}
after
(
:each
)
{
ActiveRecord
::
Base
.
observers
.
disable
(
:user_observer
)
}
...
...
spec/requests/api/session_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/requests/api/system_hooks_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/requests/api/users_spec.rb
View file @
5dd2f36a
require
'spec_helper'
describe
API
::
API
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
let
(
:user
)
{
create
(
:user
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment