Rubén Dávila
e6b5716785
Migrate Repository#local_branches from gitlab-ee.
...
This will help us to avoid posible merge conflicts when merging
gitlab-ce to gitlab-ee
2016-04-01 14:21:08 -05:00
Stan Hu
720ef51bd9
Check if repo exists before attempting to update cache info
...
Closes #14361
2016-03-27 06:17:49 -07:00
Yorick Peterse
68a4c98f50
Cache output of Repository#exists?
...
This caches the output of Repository#exists? in Redis while making sure
it's flushed properly when creating new repositories, deleting them,
etc.
For the ProjectWiki tests to work I had to make ProjectWiki#create_repo!
public as testing private methods in RSpec is a bit of a pain.
2016-03-19 21:54:08 +01:00
Zeger-Jan van de Weg
29a43373ce
Specs for the DeleteUserService
2016-03-15 22:19:51 +01:00
Zeger-Jan van de Weg
8077a5f958
Clearify who deletes the user
2016-03-15 21:09:25 +01:00
Zeger-Jan van de Weg
4231cfeba5
Target right release, rebase got it wrong
2016-03-15 21:09:25 +01:00
Zeger-Jan van de Weg
d249da1c16
Specs on force deleting of a user
2016-03-15 21:09:25 +01:00
Zeger-Jan van de Weg
4bcc097750
A worker deletes a user, so the request doesn't time out
...
Fixes #13261
2016-03-15 21:09:25 +01:00
ashleys
4cd9a5208c
web hooks to webhooks
2016-03-10 14:48:29 -05:00
Yorick Peterse
a9e0301c23
Expire caches after forking/importing a repository
...
This ensures the caches for Repository#empty? and
Repository#has_visible_content? are flushed after a repository has been
imported or forked.
Fixes gitlab-org/gitlab-ce#13505
2016-02-17 11:38:18 +01:00
Yorick Peterse
620e7bb3d6
Write to InfluxDB directly via UDP
...
This removes the need for Sidekiq and any overhead/problems introduced
by TCP. There are a few things to take into account:
1. When writing data to InfluxDB you may still get an error if the
server becomes unavailable during the write. Because of this we're
catching all exceptions and just ignore them (for now).
2. Writing via UDP apparently requires the timestamp to be in
nanoseconds. Without this data either isn't written properly.
3. Due to the restrictions on UDP buffer sizes we're writing metrics one
by one, instead of writing all of them at once.
2015-12-29 14:53:45 +01:00
Yorick Peterse
db7bbadf95
Fixed styling of MetricsWorker specs
2015-12-28 11:34:11 +01:00
Yorick Peterse
d67e2045a0
Drop empty tag values from metrics
...
InfluxDB throws an error when trying to store a list of tags where one
or more have an empty value.
2015-12-17 17:25:48 +01:00
Yorick Peterse
5142c61707
Cast values to strings before escaping them
...
This ensures that e.g. line numbers used in tags are first casted to
strings.
2015-12-17 17:25:48 +01:00
Yorick Peterse
d0352e6604
Added specs for MetricsWorker
2015-12-17 17:25:48 +01:00
Gabriel Mazetto
b5291f9599
Fixed Rubocop offenses
2015-12-15 00:53:52 -02:00
Kamil Trzcinski
c4fa894de2
Fix specs
2015-12-10 16:16:34 +01:00
Kamil Trzcinski
2988e1fbf5
Migrate CI::Services and CI::WebHooks to Services and WebHooks
2015-12-10 16:04:08 +01:00
Valery Sizov
e92ceb7b57
fix specs
2015-11-30 16:12:31 +02:00
Douwe Maan
d0ec28827d
Fix specs
2015-11-18 12:02:09 +01:00
Kamil Trzcinski
8d2758e02d
Cleanup stuck CI builds daily
2015-11-03 13:12:16 +01:00
Jacob Vosmaer
8f14332625
Remove RepositoryArchiveWorker specs
...
These tasks have shifted to gitlab_git and gitlab-git-http-server.
2015-10-14 12:19:02 +02:00
Douwe Maan
ee028d9d60
Rename reply_by_email to incoming_email to prepare for the future.
2015-09-21 10:35:37 +02:00
Valery Sizov and Kamil Trzcinski
a0c1a12dee
remove API calls from CE to CI
2015-09-18 18:02:11 +02:00
Stan Hu
9995f0806b
Import forked repositories asynchronously to prevent large repositories from timing out
...
Use import_status to track async import status and give feedback to the user
Closes #2388
Closes #2400
2015-09-11 00:34:04 -07:00
Dmitriy Zaporozhets
39ee52f1b1
Expire cache when merge request source branch was removed
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-08-28 10:23:56 +02:00
Dmitriy Zaporozhets
c1b490d6ef
Merge branch 'handle-smtp-input-errors' into 'master'
...
Gracefully handle SMTP user input errors (e.g. incorrect email addresses) to prevent Sidekiq retries
### What does this MR do?
This MR gracefully handles SMTP input errors (e.g. incorrect or invalid e-mail addresses) to prevent these types of exceptions from causing Sidekiq to retry the task. If these specific exceptions occur, they will be logged, and the e-mail will be dropped from the queue.
### Why was this MR needed?
If you include an author that has a misspelled e-mail address, Sidekiq will keep sending e-mail to all the recipients even if they have already received the e-mail. The only way to recover is to clear the Sidekiq queue.
Note that other exceptions can still be thrown (e.g. `IOError`, `Net::SMTPAuthenticationError`, `Net::SMTPServerBusy`, `Net::SMTPUnknownError`, and `TimeoutError`). If the worker encounters these, Sidekiq should retry the task.
### What are the relevant issue numbers?
Closes https://github.com/gitlabhq/gitlabhq/issues/9560
See merge request !1163
2015-08-25 09:23:43 +00:00
Douwe Maan
54b04f1c5b
Add fixture_file helper.
2015-08-20 12:41:47 -07:00
Douwe Maan
ac268674ed
Update spec.
2015-08-20 12:34:45 -07:00
Douwe Maan
e44936f3ed
Test EmailReceiverWorker.
2015-08-20 11:47:09 -07:00
Stan Hu
001c8cd0ee
Gracefully handle SMTP user input errors (e.g. incorrect email addresses) to prevent Sidekiq retries
...
Closes https://github.com/gitlabhq/gitlabhq/issues/9560
2015-08-19 23:18:34 -07:00
Dmitriy Zaporozhets
f40b99d02e
Merge branch 'master' into rubocop-for-tests
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
spec/features/issues_spec.rb
spec/models/forked_project_link_spec.rb
spec/models/hooks/service_hook_spec.rb
spec/models/hooks/web_hook_spec.rb
spec/models/project_services/hipchat_service_spec.rb
spec/requests/api/project_members_spec.rb
spec/requests/api/projects_spec.rb
spec/requests/api/system_hooks_spec.rb
spec/services/archive_repository_service_spec.rb
spec/support/matchers.rb
spec/tasks/gitlab/backup_rake_spec.rb
2015-06-23 10:44:03 +02:00
Robert Speicher
56246b70fb
Fix Style/TrailingBlankLines cop violations
2015-06-22 14:38:33 -04:00
Robert Speicher and Dmitriy Zaporozhets
5a9ede4721
Update mock and stub syntax for specs
2015-06-22 12:13:46 +02:00
Valery Sizov
bafec400f1
CI forking: tests
2015-04-06 19:45:16 +03:00
Douwe Maan
91761b0685
Add tests.
2015-03-31 13:37:21 +02:00
Douwe Maan
3b1d5a1dff
Prevent gitlab-shell character encoding issues by receiving its changes as raw data.
2015-03-15 16:52:22 +01:00
Jeroen van Baarsen
0c4a70a306
Updated rspec to rspec 3.x syntax
...
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com >
2015-02-12 19:17:35 +01:00
Dmitriy Zaporozhets
fc65f71747
Fix post-receive specs
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2014-09-02 11:05:51 +03:00
Dmitriy Zaporozhets
28e13634dc
Merge branch 'improve/mr_diff'
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
features/steps/project/project_fork.rb
features/steps/project/project_forked_merge_requests.rb
features/steps/project/project_issue_tracker.rb
features/steps/project/project_markdown_render.rb
features/steps/shared/project.rb
2014-01-23 14:38:23 +02:00
Dmitriy Zaporozhets
c227aa44f9
Make changes to tests
...
* project_with_code -> project
* project -> ermpty_project
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2014-01-22 21:03:52 +02:00
skv
a3f645ef51
Remove deprecated finders
2014-01-19 23:39:56 +04:00
Dmitriy Zaporozhets
f536c13355
fixed test using repo with commits but old factory
2013-04-01 19:06:47 +03:00
Dmitriy Zaporozhets
c9b1df1201
Fixing tests
2013-02-25 23:16:34 +02:00
Dmitriy Zaporozhets
ab0cfc0036
fixing tests after refactoring
2013-02-11 20:28:27 +02:00
Dmitriy Zaporozhets
70e3bffd95
Fixed: post-receive, project remove, tests
2013-02-05 12:47:50 +02:00
Dmitriy Zaporozhets
9773ccc451
sidekiq with green tests
2013-01-09 09:14:05 +03:00
Riyad Preukschas
19eb637419
Update uses of Gitolite.config.foo settings
2012-12-20 16:54:28 +01:00
Dmitriy Zaporozhets
e228dae876
Fix spec/workers/post_receive_spec.rb
2012-12-13 19:20:37 +02:00
Dmitriy Zaporozhets
8a08fdcd32
Fix worker specs to parse namespaces
2012-12-09 10:34:46 +02:00