summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Require spec helpers loaded by other spec helpers firstAlejandro Rodríguez2018-10-041-0/+5
|
* Ensure in-memory application settings are cleared before each testRémy Coutable2018-09-101-0/+4
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Move fixture_path out of support/rspec file which is used by ↵Thong Kuah2018-08-311-0/+1
| | | | | | | | | fast_spec_helper, so that fast specs can be run on its own again. Move `fixture_path` config together with use_transactional_fixtures and use_instantiated_fixtures. These settings are all added by rspec-rails https://github.com/rspec/rspec-rails/blob/8c6c9590b94916199950dc8a91a9741d3be30c7c/lib/rspec/rails/configuration.rb#L65-L67
* Refactor Rainbow usage in specsGabriel Mazetto2018-08-161-0/+1
| | | | | We don't test any specific string generated by it yet, so there is no point in keeping it enabled when we are disabling it everywhere we test its output.
* Resolve "Enable Auto DevOps instance-wide on GitLab.com"Dylan Griffith2018-08-161-0/+7
|
* Updates from `rubocop -a`Lin Jen-Shin2018-07-091-1/+1
|
* Fix User role displayed on projects dashboardFrancisco Javier López2018-07-061-0/+11
|
* Implement `expect_next_instance_of` and use itLin Jen-Shin2018-06-211-0/+1
| | | | | We need this because `expect_any_instance_of` doesn't work on prepended models. Now we could use the same code between CE/EE
* Port route helper from EE to CELin Jen-Shin2018-06-141-0/+1
|
* Find and mark more Git disk access locations, part 2Jacob Vosmaer2018-06-121-13/+0
|
* Fix Fog mockingKamil Trzciński2018-06-051-0/+4
|
* Support resetting of Prometheus metrics between test runsStan Hu2018-05-091-0/+7
| | | | | | | Adding the :prometheus tag to an rspec test will clear out memory-mapped files and reset the registry. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/39968
* Introduce Redis helpers. Rename BuildTraceChunkFlushToDbWorker to ↵Shinya Maeda2018-05-041-6/+13
| | | | Ci::BuildTraceChunkFlushWorker.
* Gitlab::Shell works on shard name, not pathZeger-Jan van de Weg2018-04-251-2/+2
| | | | | | | | | | | Direct disk access is done through Gitaly now, so the legacy path was deprecated. This path was used in Gitlab::Shell however. This required the refactoring in this commit. Added is the removal of direct path access on the project model, as that lookup wasn't needed anymore is most cases. Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
* Move spec helpers/matchers/shared examples/contexts to their relevant folderRémy Coutable2018-04-231-28/+31
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Introduce a new FactoriesInMigrationSpecs copRémy Coutable2018-04-061-0/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Use shard name in Git::GitlabProjects instead of shard pathAhmad Sherif2018-04-031-1/+2
| | | | Closes gitaly#1110
* Clean the test path after each spec runStan Hu2018-03-281-0/+4
| | | | | | | | | | FactoryBot's build_stubbed ignores the current database sequence of the projects table and starts at ID 1000. If more than 1000 projects are created during a test run, leftover repositories can cause spec failures. For example, a spec that expects an empty repository may fail since there may be existing content. Closes #5461
* Add HTTPS-only pagesRob Watson2018-03-221-0/+16
| | | | Closes #28857
* Adapt cycle analytics spec helper and cycle analytics usage data spec41777-include-cycle-time-in-usage-pingTiago Botelho2018-03-011-0/+4
|
* Port `read_cross_project` ability from EEBob Van Landuyt2018-02-221-0/+8
|
* Make :migration specs a little more robustMichael Kozono2018-02-161-0/+16
| | | | E.g. https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/52873034
* Ensure hooks are deleted regardless of the project forking methodAlejandro Rodríguez2018-01-191-0/+10
|
* Use an at_exit hook to stop test gitalystop-gitaly-atexitJacob Vosmaer2018-01-151-4/+0
|
* Replace factory_girl_rails with factory_bot_railsrc/use-factory_bot_railsRémy Coutable2017-12-141-1/+1
| | | | | | | | | | | I've followed the [upgrade guide](https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md) and ran these two commands: ``` grep -e FactoryGirl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|FactoryGirl|FactoryBot|" grep -e factory_girl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|factory_girl|factory_bot|" ``` Signed-off-by: Rémy Coutable <remy@rymai.me>
* Move the circuitbreaker check out in a separate processbvl-circuitbreaker-processBob Van Landuyt2017-12-081-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Set an artificial $HOME for gitaly in testJacob Vosmaer (GitLab)2017-11-301-0/+3
|
* Fix reply quote keyboard shortcut on MRs40295-fix-reply-quote-shortcut-on-mrEric Eastwood2017-11-211-0/+1
| | | | Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/40295
* Merge branch 'master' into sh-headless-chrome-supportMike Greiling2017-11-021-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (109 commits) Remove Filesystem check metrics that use too much CPU to handle requests Set merge_request_diff_id on MR when creating Add a column linking an MR to its diff Remove useless closeReopenReport specs Clarify external artifacts only working when GitLab pages is enabled Send SIGSTP before SIGTERM to actually give Sidekiq jobs 30s to finish when the memory killer kicks in Remove an exception from the git user default SSH config check Geo route whitelisting is too optimistic Update .nvmrc to current stable (v9.0.0) Update documentation Address Douwe's feedback Refactor responsive table styles to support nested error block Add changelog items Update specs for sudo behavior Move RSS and incoming email tokens from User Settings > Accounts to User Settings > Access Tokens Remove user authentication_token column Migrate user private tokens to personal access tokens Add sudo API scope Consistently use PersonalAccessToken instead of PersonalToken Remove User#private_token ...
| * Add LiveDebugger#live_debug to debug Capybara in feature tests.Rémy Coutable2017-10-161-0/+1
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | add InspectRequests helper automatically to :js testsMike Greiling2017-11-021-0/+1
| |
* | add CookieHelper and InputHelper automatically to :js testsMike Greiling2017-11-021-0/+2
|/
* Improve the flaky examples detection jobsRémy Coutable2017-10-041-1/+4
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Resolve "Precompiled assets with digest strings are ignored in CI"Mike Greiling2017-10-031-0/+18
|
* Automatically set a :type for specsrc/tag-specsRémy Coutable2017-09-221-2/+10
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Force `RAILS_ENV` to `test` in `spec/spec_helper.rb`Rémy Coutable2017-09-141-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Stub `ForkedStorageCheck.storage_available?` by default in all specsrs-stub-storage-availability-checkRobert Speicher2017-08-221-0/+12
| | | | | Add `:broken_storage` metadata to examples to disable this behavior only when necessary.
* Migrate down before each migration unit testbackstage/gb/migrations-tests-schema-versionGrzegorz Bizon2017-08-171-1/+1
| | | | | | | | | | `migrate!` helper triggers a migration that is under the test, so we need to revert it before each subsequent example. This means that we need to place it in `before(:each, :migration)` hook. We still want to migrate everything up *after* each *context*, so in otherwords we need to place migrate up helper in `before(:context, :migration)`.
* Make it possible to provide schema version in testsGrzegorz Bizon2017-08-161-8/+3
|
* Migrate db schema for context in :migration specsGrzegorz Bizon2017-08-161-2/+2
|
* Merge branch '35804-document-table-based-tests' into 'master'Robert Speicher2017-08-141-0/+1
|\ | | | | | | | | | | | | Use rspec-parameterized for table-based tests Closes #35804 See merge request !13469
| * Use rspec-parameterized for table-based testsNick Thomas2017-08-111-0/+1
| |
* | Merge branch '32004-use-timecop-safe-mode' into 'master'Robert Speicher2017-08-111-0/+1
|\ \ | | | | | | | | | | | | | | | | | | Enable Timecop safe mode Closes #32004 See merge request !13498
| * | Enable Timecop safe mode32004-use-timecop-safe-modeRémy Coutable2017-08-111-0/+1
| |/ | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Use a new RspecFlakyListener to detect flaky specsRémy Coutable2017-08-111-6/+6
|/ | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Reset only migration models36052-reset-only-migration-modelsLin Jen-Shin2017-08-071-2/+2
| | | | | | | | | | | | | | | | | So that we could make sure migration tests could run even if geo is not setup in EE. This is because we have a model like this: ``` ruby class Geo::BaseRegistry < ActiveRecord::Base def self.connection raise 'Geo secondary database is not configured' unless Gitlab::Geo.geo_database_configured? super end end ```
* Don't send rejection mails for all auto-generated mails28472-ignore-auto-generated-mailsLin Jen-Shin2017-08-031-1/+5
| | | | Also make it easier to have mailer helper
* Remove events column from notification settings33620-remove-events-from-notification_settingsSean McGivern2017-07-311-0/+4
| | | | | This was migrated to separate columns in 9.4, and now just needs to be removed for real.
* Ensure Gitlab::Application.routes.default_url_options are set correctly in ↵Rémy Coutable2017-07-281-0/+1
| | | | | | Capybara + :js specs Signed-off-by: Rémy Coutable <remy@rymai.me>
* Update shoulda-matchers gem to 3.1.2Dmitriy Zaporozhets2017-07-241-0/+7
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>