Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2016-09-27Merge branch 'improvement/project-with-board-factory' into 'master' Robert Speicher
Improve project_with_board factory to create the default lists ## What does this MR do? Create the default lists after creating a project with the `project_with_board` factory. This makes the setup phase on tests be more simpler. ## Why was this MR needed? These two lists are present in every issue board, so we don't have to create them manually in every test. See merge request !6480
2016-09-27Merge branch 'issue-boards-filter-label-spaces' into 'master' Fatih Acet
Fixed list issues not loading with spaces in filtered values ## What does this MR do? Vue resource is very kindly encoding our URL params when sending. However - we didn't actually want the `+` to be encoded because Rails reads that as a space, but doesn't read the encoded value as a space :confused: This converts the `+` into spaces :thumbsup: ## What are the relevant issue numbers? Closes #21920 See merge request !6258
2016-09-26Improve project_with_board factory to create the default listsDouglas Barbosa Alexandre
2016-09-26Fix snippets paginationRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-26added more specsJames Lopez
2016-09-26Fixes issue with rails reserved keyword type exporting/importing services. ↵James Lopez
Also fixed CustomIssueTrackerService title setter and added relevant specs.
2016-09-25Merge branch '22229-use-base-sha-when-downloading-merge-requests' into 'master' Robert Speicher
Use base SHA for patches and diffs ## What does this MR do? Switch from using 'start SHA' to 'base SHA' for patches and diffs ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? Makes the downloaded patches and diffs on the merge request page match the frontend-rendered "changes" in these scenarios: * Unpatched gitlab-workhorse, downloading patchsets of open MRs (https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/68) * Unpatched gitlab-workhorse, downloading diffs of open and merged MRs * Patched gitlab-workhorse, downloading patchsets of merged merge requests ## What are the relevant issue numbers? Closes #22229 See merge request !6435
2016-09-24Merge branch 'gitlab-ce-milestone-tab-badges' into 'master' Fatih Acet
Milestone tab badges ### What does this MR do? Adds count badges to the tabs on the Milestone page to mirror the Issue page. ### Are there points in the code the reviewer needs to double check? CSS: Padding was added to the `.milestone` element to make expired milestones look good. ### Why was this MR needed? For consistency with other tabs ### What are the relevant issue numbers? Closes #20114 ### Screenshots (if relevant) **Before** <img src="/uploads/1f75853a863a9058ee409916b7ee4057/Screen_Shot_2016-07-22_at_13.22.20.png" width="362"> **After** <img src="/uploads/8a058290850f571db249dd9b23f5138d/Screen_Shot_2016-07-22_at_13.21.58.png" width="303"> ![Screen_Shot_2016-08-23_at_1.42.56_AM](/uploads/b072dc6bdf505b2fce46660beaf0eae7/Screen_Shot_2016-08-23_at_1.42.56_AM.png) ![Screen_Shot_2016-08-23_at_1.43.15_AM](/uploads/e7440bf2aa628aa4dba63863083699c0/Screen_Shot_2016-08-23_at_1.43.15_AM.png) ### Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5946
2016-09-23Merge branch 'fix/speed-up-group-milestone-show' into 'master' Yorick Peterse
Speed up group milestones show page See merge request !6457
2016-09-23Merge branch 'redis-config-mutation' into 'master' Robert Speicher
Make Gitlab::Redis.params safe for mutation Would have avoided https://gitlab.com/gitlab-com/infrastructure/issues/464 Defends in depth against programming mistakes. See merge request !6472
2016-09-23Ensure milestones passed to GlobalMilestone is an ActiveRecord::RelationAhmad Sherif
2016-09-23Merge branch 'search-filters-label-fix' into 'master' Jacob Schatz
Fixed search dropdown labels not displaying ## What does this MR do? Returns the search controller method after finding the project & group. ## Why was this MR needed? The search controller was returning early when the search term was empty causing a bug where the dropdown toggles wouldn't show the correct text - instead defaulting to `Any`. ## Screenshots (if relevant) ![Screen_Shot_2016-09-09_at_12.09.57](/uploads/8c6bb36f4e163312314611d2877d5fa4/Screen_Shot_2016-09-09_at_12.09.57.png) ## What are the relevant issue numbers? Closes #21783 See merge request !6277
2016-09-22Use base SHA for patches and diffsNick Thomas
This commit changes the revisions used for diffs. The current behaviour is to show all changes between current tip of master and tip of the MR, rather than matching the output of the web frontend (which just shows the changes in the MR). Switching from start_sha to base_sha fixes this.
2016-09-22Make Gitlab::Redis.params safe for mutationJacob Vosmaer
2016-09-22Revert part of "Merge branch 'update_issues_mr_counter' into 'master'Rémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-22Revert "Merge branch ↵Rémy Coutable
'22421-fix-issuable-counter-when-more-than-one-label-is-selected' into 'master' " This reverts commit 8ed5be5935a77fffe730baa188d1e1fc1c739d72, reversing changes made to fb0d1378f4f3365a9cae0938829da0560a92b6e6.
2016-09-22Merge branch '22417-api-fork-fix' into 'master' Rémy Coutable
API: Return 404 when trying to fork to unaccessible namespace Closes #22417 See merge request !6452
2016-09-22Merge branch 'fix-pipeline-for-empty-merge-request-diff' into 'master' Rémy Coutable
Fix pipeline error when trying to read empty merge request diff When a user pushed something which resulted an empty merge request diff, `st_commits` would be `nil`. Therefore we also need to check if there exists `st_commits`. We could tell this from: ``` ruby def commits @commits ||= load_commits(st_commits || []) end ``` and ``` ruby def save_commits new_attributes = {} commits = compare.commits if commits.present? commits = Commit.decorate(commits, merge_request.source_project).reverse new_attributes[:st_commits] = dump_commits(commits) end update_columns_serialized(new_attributes) end ``` Closes #22438 See merge request !6470
2016-09-22API: Return 404 when trying to fork to unaccessible namespaceRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-22Add test for MergeRequestDiff#commits_sha, feedback:Lin Jen-Shin
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6470#note_15856755
2016-09-22Hotfix the issuable counters when filtering by multiple labelsRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-22For empty merge_request_diff st_commits would be nilLin Jen-Shin
Closes #22438
2016-09-21fix import/export security specs after mergeJames Lopez
2016-09-21Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqRémy Coutable
2016-09-21Merge branch 'and-you-get-awards' into 'master' Rémy Coutable
And Snippets get awards ## What does this MR do? Makes snippets more awesome, by making them awardables ## Why was this MR needed? Because Snippets were left behind. ## What are the relevant issue numbers? Closes #17878 See merge request !4456
2016-09-21Merge branch 'rs-simplify-fetch_members' into 'master' Rémy Coutable
Simplify ProjectTeam#fetch_members to satisfy flog ## What does this MR do? - Add specs for ProjectTeam#fetch_members - Simplify ProjectTeam#fetch_members to satisfy flog ## What are the relevant issue numbers? Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22200 See merge request !6431
2016-09-21Merge branch 'show-all-pipelines-from-all-diffs' into 'master' Rémy Coutable
Show all pipelines from all merge_request_diffs This way we could also show pipelines from commits which were discarded due to a force push. Closes #21889 See merge request !6414
2016-09-21fixing security specs after mergeJames Lopez
2016-09-21Merge branch 'limit-number-of-shown-environments' into 'master' Rémy Coutable
Limit number of shown environments ## What does this MR do? This MR limits in context of Merge Request a list of shown environments. Previously we would show all environments containing the SHA of the head commit of Merge Request. However, with introducing of dynamically created environments this lead to a cases that we would show multiple review apps, for different branches, because these branches would contain a new questioned commit. This MR changes what environments we test against presence of the commit, to: 1. We look for environments with deployments to source_branch of source_project: used for deployments to per-branch environments, 2. We look for environments with deployments to target_branch of target_project: used for deployments to staging / production environments, 3. We look for environments with deployments for tags on target_project: used for staging / production environments. ## Why was this MR needed? To improve a list of returned environments when we introduced ability to create dynamic environments for review apps: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6323 See merge request !6438
2016-09-21Scope environments to projectKamil Trzcinski
2016-09-21Improve specsKamil Trzcinski
2016-09-21Merge branch 'add_spec_for_committer_hash' into 'master' Rémy Coutable
Add spec covering 'committer_hash' Adds a missing spec from changes added in !5822 See merge request !6433
2016-09-21Add tests to verify the correctness of returned environmentsKamil Trzcinski
2016-09-21Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets
2016-09-21Merge branch 'post-merge-improve-of-ci-permissions' into 'master' Rémy Coutable
Post-merge improve of CI permissions Improves code from !6409 See merge request !6432
2016-09-21Merge branch '21170-cycle-analytics' into 'master' Stan Hu
Cycle Analytics: first iteration ## What does this MR do? - Implement the first iteration of the "Cycle Analytics" feature. ## What are the relevant issue numbers? - Closes #21170 ## Screenshots ![cycle_analytics_screencast.gif](/uploads/d23c3c912caa6935fd47b53ca3a56b97/cycle_analytics.gif) ## Backend Tasks - [x] Implementation - [x] Phases - [x] Issue (Tracker) - [x] Plan (Board) - [x] Code (IDE) - [x] Test (CI) - [x] Review (MR) - [x] Staging (CD) - [x] Production (Total) - [x] Make heuristics more modular - [x] Scope to project - [x] Date range (30 days, 90 days) - [x] Access restriction - [x] Test - [x] Find a better way to test these phases - [x] Phases - [x] Issue (Tracker) - [x] Plan (Board) - [x] Code (IDE) - [x] Test (CI) - [x] Review (MR) - [x] Staging (CD) - [x] Production (Total) - [x] Test for "end case happens before start case" - [x] Consolidate helper - [x] Miniboss review - [x] Performance testing with mock data - [x] Improve performance - [x] Pre-calculate "merge requests closing issues - [x] Pre-calculate everything else - [x] Test performance against 10k issues - [x] Test all pre-calculation code - [x] Ci::Pipeline -> build start/finish - [x] Ci::Pipeline#merge_requests - [x] Issue -> record default metrics after save - [x] MergeRequest -> record default metrics after save - [x] Deployment -> Update "first_deployed_to_production_at" for MR metrics - [x] Git Push -> Update "first commit mention" for issue metrics - [x] Merge request create/update/refresh -> Update "merge requests closing issues" - [x] Remove `MergeRequestsClosingIssues` when necessary - [x] Changes to unblock Fatih - [x] Add summary data - [x] `stats` should be array - [x] Let `stats` be `null` if all `stats` are null - [x] Indexes for "merge requests closing issues" - [x] Test summary data - [x] Scope everything to project - [x] Find out why tests were passing - [x] Filter should include issues/MRs which have made it to production within the range - [x] Don't create duplicate `MergeRequestsClosingIssues` - [x] Fix tests - [x] MySQL median - [x] Assign to Douwe for review - [x] Fix conflicts - [x] Implement suggestions from Yorick's review - [x] Test on PG - [x] Test on MySQL - [x] Refactor - [x] Cleanup - [x] What happens if we have no data at all? - [x] Extract common queries to methods / scopes - [x] Remove unused queries - [x] Downtime for foreign key migrations - [x] Find a way around "if issue.metrics.present?" all over the place - [x] Find a way around "if merge_request.metrics.present?" all over the place - [x] Test migrations on a fresh database - [x] MySQL - [x] Pg - [x] Access issues - While the project is public and the visibility is set to "Everyone with access", you cannot visit the cycle analytics page when signed out. - [x] CHANGELOG - [x] Implement suggestions from Douwe's review - [x] First set of comments - [x] Second set of comments - [x] Third set of comments - [x] Fourth set of comments - [x] Make sure build is green - [ ] Make issue for "polish" - [ ] EE MR See merge request !5986
2016-09-21Fix `CreateDeploymentService` spec.Timothy Andrew
1. The spec tests that if: - The merge request is merged - The target branch is deployed to production - The `first_deployed_to_production_at` metric is `nil` (for some reason) - The target branch is deployed to production again - The `first_deployed_to_production_at` metric stays as `nil` (and is not overwritten). 2. Failure only on MySQL due to some datetime weirdness.
2016-09-21Reload issues in spec to ensure label<->issue mapping properly loadedStan Hu
2016-09-21Fix build.Timothy Andrew
2016-09-20Add a spec for merge request metric caching while refreshing a merge request ↵Timothy Andrew
from a forked project.
2016-09-20Use the `IssuableBaseService` lifecycle hooks to cache ↵Timothy Andrew
`MergeRequestsClosingIssues` - Instead of overriding `create` and `update` in `MergeRequests::BaseService` - Get all merge request service specs passing
2016-09-20Merge branch 'issue_20078' into 'master' Yorick Peterse
Test if issue authors can access private projects See merge request !6419
2016-09-20Implement a second round of review comments from @DouweM.Timothy Andrew
- Don't use `TableReferences` - using `.arel_table` is shorter! - Move some database-related code to `Gitlab::Database` - Remove the `MergeRequest#issues_closed` and `Issue#closed_by_merge_requests` associations. They were either shadowing or were too similar to existing methods. They are not being used anywhere, so it's better to remove them to reduce confusion. - Use Rails 3-style validations - Index for `MergeRequest::Metrics#first_deployed_to_production_at` - Only include `CycleAnalyticsHelpers::TestGeneration` for specs that need it. - Other minor refactorings.
2016-09-20Merge branch 'slash-commands-load-fix' into 'master' Robert Speicher
Fixed slash commands not loading ## What does this MR do? Fixes an issue with slash commands not working when the autocomplete source is loading & then the new issue button is clicked. This also fixes an issue where the autocomplete source is loaded on pages where it isn't actually needed. ## What are the relevant issue numbers? Closes #21774, #21807 See merge request !6207
2016-09-20Fix a logic error in ProjectTeam#fetch_invited_membersRobert Speicher
We were calling `.where` and `.send` on the relation, but never doing anything with the return value, resulting in proper access-level filtering never being of any consequence.
2016-09-20Test if issue authors can access private projectsFelipe Artur
2016-09-20Add spec covering 'committer_hash'Dan Dunckel
2016-09-20Improve JwtController implementationKamil Trzcinski
2016-09-20Use factory instead of using new directly. Feedback:Lin Jen-Shin
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6414#note_15765156
2016-09-20Merge branch 'update_issues_mr_counter' into 'master' Rémy Coutable
Fix issues with wrong issues/merge request counts when filters are selected Closes #15356 plus counter for issues and MR are now displayed for the these paths `https://gitlab.com/groups/group-name/issues` `https://gitlab.com/groups/group-name/merge_requests` `https://gitlab.com/dashboard/issues` and `https://gitlab.com/dashboard/merge_requests` See merge request !4960