summaryrefslogtreecommitdiff
path: root/spec/support
Commit message (Collapse)AuthorAgeFilesLines
* Improve output for extra queries in specsimprove-extra-queries-outputSean McGivern2017-11-221-2/+9
| | | | | | | | | | | | Previously, this used `Array#-`, which would remove all queries that matches the query text in the original set. However, sometimes we have a problem with parameterised queries, where the query text is identical both times, so we'd run a query N times instead of once, and it would be hidden from the output. Replace the logic to only remove a given query N times from the actual log, where N is the number of times it appears in the expected log.
* Adds Rubocop rule for line break after guard clauseJacopo2017-11-163-0/+3
| | | | Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
* we need to disable gitaly for some testsKim "BKC" Carlbäcker2017-11-141-2/+6
|
* Merge branch '36099-api-responses-missing-x-content-type-options-header' ↵Douwe Maan2017-11-081-0/+5
| | | | | | | | | | | into '10-1-stable' Include X-Content-Type-Options (XCTO) header into API responses See merge request gitlab/gitlabhq!2211 (cherry picked from commit 6c818e77f2abeef2dd7b17a269611b018701fa79) e087e075 Include X-Content-Type-Options (XCTO) header into API responses
* Merge branch 'github-importer-refactor' into 'master'Douwe Maan2017-11-081-18/+18
|\ | | | | | | | | | | | | Rewrite the GitHub importer to perform work in parallel and greatly improve performance Closes #33135, #38621, and #39361 See merge request gitlab-org/gitlab-ce!14731
| * Rewrite the GitHub importer from scratchYorick Peterse2017-11-071-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this MR there were two GitHub related importers: * Github::Import: the main importer used for GitHub projects * Gitlab::GithubImport: importer that's somewhat confusingly used for importing Gitea projects (apparently they have a compatible API) This MR renames the Gitea importer to Gitlab::LegacyGithubImport and introduces a new GitHub importer in the Gitlab::GithubImport namespace. This new GitHub importer uses Sidekiq for importing multiple resources in parallel, though it also has the ability to import data sequentially should this be necessary. The new code is spread across the following directories: * lib/gitlab/github_import: this directory contains most of the importer code such as the classes used for importing resources. * app/workers/gitlab/github_import: this directory contains the Sidekiq workers, most of which simply use the code from the directory above. * app/workers/concerns/gitlab/github_import: this directory provides a few modules that are included in every GitHub importer worker. == Stages The import work is divided into separate stages, with each stage importing a specific set of data. Stages will schedule the work that needs to be performed, followed by scheduling a job for the "AdvanceStageWorker" worker. This worker will periodically check if all work is completed and schedule the next stage if this is the case. If work is not yet completed this worker will reschedule itself. Using this approach we don't have to block threads by calling `sleep()`, as doing so for large projects could block the thread from doing any work for many hours. == Retrying Work Workers will reschedule themselves whenever necessary. For example, hitting the GitHub API's rate limit will result in jobs rescheduling themselves. These jobs are not processed until the rate limit has been reset. == User Lookups Part of the importing process involves looking up user details in the GitHub API so we can map them to GitLab users. The old importer used an in-memory cache, but this obviously doesn't work when the work is spread across different threads. The new importer uses a Redis cache and makes sure we only perform API/database calls if absolutely necessary. Frequently used keys are refreshed, and lookup misses are also cached; removing the need for performing API/database calls if we know we don't have the data we're looking for. == Performance & Models The new importer in various places uses raw INSERT statements (as generated by `Gitlab::Database.bulk_insert`) instead of using Rails models. This allows us to bypass any validations and callbacks, drastically reducing the number of SQL queries and Gitaly RPC calls necessary to import projects. To ensure the code produces valid data the corresponding tests check if the produced rows are valid according to the model validation rules.
* | Add helper methods to redirect legacy pathsBob Van Landuyt2017-11-071-0/+13
|/
* Merge branch 'fix-comments-spec' into 'master'Rémy Coutable2017-11-071-1/+1
|\ | | | | | | | | Fix merge_request_spec See merge request gitlab-org/gitlab-ce!15250
| * Fix merge_request_specAnnabel Dunstone Gray2017-11-071-1/+1
| |
* | Merge branch 'master' into 38464-k8s-appsShinya Maeda2017-11-081-0/+1
|\ \ | |/
| * Merge branch 'fix/gb/ensure-that-job-belongs-to-stage' into 'master'Kamil Trzciński2017-11-071-0/+1
| |\ | | | | | | | | | | | | | | | | | | Make sure that every job has a stage assigned Closes #37979 See merge request gitlab-org/gitlab-ce!14724
| | * Fix cycle analytics specsGrzegorz Bizon2017-11-061-0/+1
| | |
* | | Merge branch 'master' into 38464-k8s-appsShinya Maeda2017-11-071-1/+4
|\ \ \ | |/ /
| * | Merge branch 'feature/custom-attributes-on-projects-and-groups' into 'master'Rémy Coutable2017-11-071-1/+4
| |\ \ | | | | | | | | | | | | | | | | Support custom attributes on groups and projects See merge request gitlab-org/gitlab-ce!14593
| | * | Support custom attributes on projectsMarkus Koller2017-11-061-1/+4
| | |/
* | | Merge branch 'master' into 38464-k8s-appsShinya Maeda2017-11-0718-78/+136
|\ \ \ | |/ /
| * | Remove 10.3 comments (Tracked by a tech debts issue). Refactor spec factory ↵refactor-clustersShinya Maeda2017-11-061-36/+0
| | | | | | | | | | | | name. Use ArgumentError
| * | Merge branch 'master' into refactor-clustersShinya Maeda2017-11-0517-42/+136
| |\ \ | | |/
| | * Merge branch 'master' into sh-headless-chrome-supportMike Greiling2017-11-031-0/+4
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (33 commits) Ignore SQL CACHE hits in Sherlock Fix SQL timings for the performance bar Find the LFS-objects for a fork within a the fork network Remove bottom-border from last responsive table row Add system hooks user_rename and group_rename Unlink a project from a fork network when it's source was deleted. Make sure the settings page renders when root of a fork is deleted Remove Peek's original keyboard shortcut (numpad 0, keycode 96) Add application setting to Auto DevOps docs Enable MergeableSelector in scss-lint (for !14567) Enable MergeableSelector in scss-lint (for !14055) Enable MergeableSelector in scss-lint (for !14062) Enable MergeableSelector in scss-lint (for !14398) Enable MergeableSelector in scss-lint (for !13480) Enable MergeableSelector in scss-lint (for !13473) Enable MergeableSelector in scss-lint (for !13600) Enable MergeableSelector in scss-lint Resolve ""To do" should be "Todos" on Todos list page" Avoid regenerating the ref path for the environment Remove white space at bottom of issue boards ...
| | | * Merge branch 'bvl-unlink-fixes' into 'master'Douwe Maan2017-11-031-0/+4
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes some bugs related to forked projects of which the source was deleted. Closes #39667 See merge request gitlab-org/gitlab-ce!15150
| | | | * Find the LFS-objects for a fork within a the fork networkBob Van Landuyt2017-11-031-0/+4
| | | | |
| | * | | Merge branch 'master' into sh-headless-chrome-supportMike Greiling2017-11-0212-21/+116
| | |\ \ \ | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 ...
| | * | | refactor wait_for_requests, add slow_requests block helperMike Greiling2017-11-022-8/+30
| | | | |
| | * | | remove unused capybara_select2 helperMike Greiling2017-11-011-5/+0
| | | | |
| | * | | add spacing around yieldMike Greiling2017-11-011-0/+2
| | | | |
| | * | | make window resizing more resiliant on small screens when headless mode is offMike Greiling2017-11-011-3/+7
| | | | |
| | * | | fix flaky fill_in use in which return key would occasionally be intercepted ↵Mike Greiling2017-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | by autocomplete
| | * | | move resize option the pre-test hooks instead of post-testMike Greiling2017-11-011-3/+3
| | | | |
| | * | | reset browser window size between testsMike Greiling2017-11-011-0/+3
| | | | |
| | * | | allow inspect_request to inject request headers in order to test Sendfile ↵Mike Greiling2017-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | requests in jobs_spec.rb
| | * | | Merge branch 'master' into sh-headless-chrome-supportMike Greiling2017-10-2910-86/+85
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (96 commits) Fetch the merged branches at once Merging EE doc into CE Avoid using Rugged in Gitlab::Git::Wiki#preview_slug Cache commits on the repository model Remove groups_select from global namespace & simplifies the code Change default disabled merge request widget message to "Merge is not allowed yet" Semi-linear history merge is now available in CE. Remove repetitive karma spec Improve spec to check hidden component Rename to shouldShowUsername Add KubernetesService#default_namespace tests Revert "Merge branch '36670-remove-edit-form' into 'master'" Fix bitbucket login Remove duped tests Add path attribute to WikiFile class Make local_branches OPT_OUT Clarify the language around External Group membership with SAML SSO to clarify that this will NOT add users to GitLab Groups. Added ssh fingerprint, gitlab ci and pages information in an instance configuration page Fix the incorrect value being used to set GL_USERNAME on hooks Resolve "Remove overzealous tooltips in projects page tabs" ...
| | * | | | add InspectRequests helperMike Greiling2017-10-231-0/+15
| | | | | |
| | * | | | Merge branch 'master' into sh-headless-chrome-supportMike Greiling2017-10-239-16/+69
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (297 commits) Fix deletion of container registry or images returning an error The fog-aliyun gem had a bug in v0.1.0 for file storage creation/update. This merge requests update the gem to v0.2.0 which contains the fix: Decrease ABC threshold to 54.28 Update VERSION to 10.2.0-pre Update CHANGELOG.md for 10.1.0 Document `CI_SHARED_ENVIRONMENT` and `CI_DISPOSABLE_ENVIRONMENT` Fix the external URLs generated for online view of HTML artifacts Use title as placeholder instead of issue title for reusability Fix failure in current_settings_spec.rb Clarify the difference between project_update and project_rename URI decode Page-Title header to preserve UTF-8 characters Update Gitaly version to v0.49.0 Decrease Perceived Complexity threshold to 14 Resolve "Remove help text regarding group issues on group issues page (and group merge requests page)" Force non diff resolved discussion to display when collapse toggled Added submodule support in multi-file editor add note about after_script being run separately Check for element before evaluate_script Merge branch 'master-i18n' into 'master' Update Prometheus gem to fix problems with other files overwriting current file ...
| | * | | | | add CHROME_HEADLESS environment variable to disable headless modeMike Greiling2017-10-211-1/+4
| | | | | | |
| | * | | | | fix trailing whitespaceMike Greiling2017-10-211-1/+0
| | | | | | |
| | * | | | | clear localStorage after each capybara test (global)Mike Greiling2017-10-201-0/+3
| | | | | | |
| | * | | | | fix rubocop (oops)Mike Greiling2017-10-201-1/+1
| | | | | | |
| | * | | | | add InputHelper rspec helper to simulate non-BMP character inputMike Greiling2017-10-171-0/+8
| | | | | | |
| | * | | | | fix shared discussion_comments examples (for realz this time!)Mike Greiling2017-10-131-23/+22
| | | | | | |
| | * | | | | Merge branch 'master' into sh-headless-chrome-supportMike Greiling2017-10-123-12/+12
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (104 commits) Update licenses fix a wrong method call in the refactor fix a whitespace fix for discussion Update templates via: Update doc accordingly to: Cache issuable template names Fix the format of rugged alternate directory list Match full file path in FileDetector Fixes from CSS refactor Resolve "Prometheus service page shows error" Explicit state integration deletion Move all API authentication code to APIGuard Shorten example translation for inclusive language [ci-skip] add changelog fix the merger override to remove source branch add spec Removed d3.js from the users and graphs bundle Cleanup data-page attribute after each Karma test Update template description wording ...
| | * | | | | | Fix trigger elements and element is not clickable at this positionJose Ivan Vargas2017-10-111-2/+2
| | | | | | | |
| | * | | | | | fixed shared discussion_comments exampleJose Ivan Vargas2017-10-101-9/+23
| | | | | | | |
| | * | | | | | fix click trigger methodMike Greiling2017-10-101-1/+1
| | | | | | | |
| | * | | | | | Fixed click eventsJose Ivan Vargas2017-10-091-1/+1
| | | | | | | |
| | * | | | | | Merge branch 'master' into sh-headless-chrome-supportMike Greiling2017-10-098-8/+236
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (113 commits) Introduce new hook data builders for Issue and MergeRequest Don't create todos for old issue assignees Start adding Gitlab::HookData::IssuableBuilder Include the changes in issuable webhook payloads Rename the `codeclimate` job to `codequality` Don't show an "Unsubscribe" link in snippet comment notifications Add QA::Scenario::Gitlab::Group::Create Removes CommitsList from global namespace Fix wiki empty page translation namespace not being removed Fixes mini graph in commit view Fix link to new i18n index page Update i18n docs Move i18n/introduction to i18n/index Resolve "Simple documentation update - backup to restore in restore section" Remove AjaxLoadingSpinner and CreateLabelDropdown from global namespace Move cycle analytics banner into a vue file Updated Icons + Fix for Collapsed Groups Angle Don't create fork networks for root projects that are deleted Remove executable permissions on images to make docs lint happy Sync up hard coded DN class in migration ...
| | * \ \ \ \ \ \ Merge branch 'master' into sh-headless-chrome-supportJose Ivan Vargas2017-10-064-2/+371
| | |\ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ Merge branch 'master' into sh-headless-chrome-supportJose Ivan Vargas2017-10-032-12/+16
| | |\ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/master' into sh-headless-chrome-supportJose Ivan Vargas2017-09-292-0/+106
| | |\ \ \ \ \ \ \ \ \
| | * | | | | | | | | | modified clear_browser_session method to use the manage method for deleting ↵Jose Ivan Vargas2017-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cookies
| | * | | | | | | | | | Merge branch 'master' into sh-headless-chrome-supportJose Ivan Vargas2017-09-262-1/+7
| | |\ \ \ \ \ \ \ \ \ \