summaryrefslogtreecommitdiff
path: root/spec/support/stub_configuration.rb
Commit message (Collapse)AuthorAgeFilesLines
* Don't use Markdown cache for stubbed settings in specsignore-markdown-cache-when-stubbing-application-settingsSean McGivern2017-12-151-0/+3
| | | | | | | | | | | | | | | The ApplicationSetting model uses the CacheMarkdownField concern, which updates the cached HTML when the field is updated in the database. However, in specs, when we want to test conditions using ApplicationSetting, we stub it, because this is accessed in different ways throughout the application. This means that if a spec runs that caches one of the Markdown fields, and a later spec uses `stub_application_setting` to set the raw value of that field, the cached value was still the original one. We can work around this by ignoring the Markdown cache in contexts where we're using `stub_application_setting`. We could be smarter, and only do this on the Markdown fields of the model, but this is probably fine.
* Move the circuitbreaker check out in a separate processbvl-circuitbreaker-processBob Van Landuyt2017-12-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Moving the check out of the general requests, makes sure we don't have any slowdown in the regular requests. To keep the process performing this checks small, the check is still performed inside a unicorn. But that is called from a process running on the same server. Because the checks are now done outside normal request, we can have a simpler failure strategy: The check is now performed in the background every `circuitbreaker_check_interval`. Failures are logged in redis. The failures are reset when the check succeeds. Per check we will try `circuitbreaker_access_retries` times within `circuitbreaker_storage_timeout` seconds. When the number of failures exceeds `circuitbreaker_failure_count_threshold`, we will block access to the storage. After `failure_reset_time` of no checks, we will clear the stored failures. This could happen when the process that performs the checks is not running.
* Find the LFS-objects for a fork within a the fork networkBob Van Landuyt2017-11-031-0/+4
|
* Read circuitbreaker settings from `Gitlab::CurrentSettings`Bob Van Landuyt2017-10-171-4/+0
| | | | Instead of from the configuration file
* Allow the git circuit breaker to correctly handle missing repository storagesNick Thomas2017-09-221-1/+1
|
* Allow a `failure_wait_time` of 0 for storage accessBob Van Landuyt2017-08-161-1/+4
| | | | | This allows testing every storage attempt after a failure. Which could be useful for tests
* Add a helper to stub storage settings with defaultsbvl-port-storage-spec-helpers-from-eeBob Van Landuyt2017-08-091-0/+11
|
* Support custom directory in gitlab:backup:create taskMarkus Koller2017-07-271-7/+22
|
* Instead of adding master, stub_not_protect_default_branchLin Jen-Shin2017-07-181-0/+5
|
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-2/+2
|
* Allow manual bypass of auto_sign_in_with_providermabes/gitlab-ce-bypass-auto-loginMaxime Besson2017-06-021-0/+4
| | | | | | | | | This commit lets a user bypass the automatic signin on the login form, in order to login with a technical (admin, etc) account Closes #3786 Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add a new `stub_mattermost_setting` stub helper to properly stub Mattermost ↵Rémy Coutable2017-03-281-0/+4
| | | | | | settings Signed-off-by: Rémy Coutable <remy@rymai.me>
* Rename reply_by_email to incoming_email to prepare for the future.Douwe Maan2015-09-211-2/+2
|
* Add stub_reply_by_email_setting helper.Douwe Maan2015-08-201-0/+4
|
* Use stub_application_setting in a few more specsRobert Speicher2015-07-061-0/+26
| | | | | These specs also failed when run by themselves before this change, so we've likely got some kind of cross-test contamination going on.
* Fix ApplicationHelper specsrs-fix-application-helper-specsRobert Speicher2015-06-301-0/+14
There were several specs that were failing when run by themselves. - Use the `helper` object, as per RSpec 3 standards - Use `assign` to assign instance variables that helpers expect - Add `StubConfiguration` support module