summaryrefslogtreecommitdiff
path: root/spec/models/cycle_analytics
Commit message (Collapse)AuthorAgeFilesLines
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove superfluous type defs in specsKeifer Furzland2017-07-276-6/+6
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add transient head_pipeline_of to pipeline factoriesissue_32225Felipe Artur2017-05-221-2/+1
|
* Fix SpecsFelipe Artur2017-05-081-0/+1
|
* Don't use FFaker in factories, use sequences insteadRémy Coutable2017-04-033-4/+4
| | | | | | | FFaker can generate data that randomly break our test suite. This simplifies our factories and use sequences which are more predictive. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Rename commit_file, commit_dir and remove_file and update specsDouwe Maan2017-02-242-6/+4
|
* Enable Style/SpaceInsideBracketsDouwe Maan2017-02-231-1/+1
|
* Merge branch 'fix-git-hooks-when-creating-file' into 'master' Douwe Maan2017-02-022-5/+11
|\ | | | | | | | | | | | | Don't execute git hooks if you create branch as part of other change Closes #23439 See merge request !7237
| * Merge remote-tracking branch 'upstream/master' into ↵fix-git-hooks-when-creating-fileLin Jen-Shin2017-02-027-7/+8
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix-git-hooks-when-creating-file * upstream/master: (190 commits) Remove unnecessary returns / unset variables from the CoffeeScript -> JS conversion. update spec Change the reply shortcut to focus the field even without a selection. use destroy_all Remove settings cog from within admin scroll tabs; keep links centered add changelog remove old project members from project add spec replicating validation error Fix small typo on new branch button spec Improve styling of the new issue message Don't capitalize environment name in show page Abillity to promote project labels to group labels Edited the column header for the environments list from created to updated and added created to environments detail page colum header titles Update and pin the `jwt` gem to ~> 1.5.6 refactor merge request build service Update index.md Clarify that Auto Deploy requires a public project. 19164 Add settings dropdown to mobile screens cop for gem fetched from a git source Add CHANGELOG entry ...
| * \ Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-01-268-87/+28
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix-git-hooks-when-creating-file * upstream/master: (1122 commits) Update CHANGELOG.md for 8.16.2 Display project ID in project settings (!8572) fixed points from comments to improve code quality Update CHANGELOG.md for 8.14.8 Statisfy eslint Add CHANGELOG entry Fix access to the wiki code via HTTP when repository feature disabled Display fullscreen button on small screens (!5302) Prevent removing fields from dropdowns on input elements fix for all themes Return struct instead of multiple values Fix race conditions for AuthorizedProjectsWorker Add User#nested_groups and User#nested_projects methods Fix spec failure due to timestamp ordering issue in mySQL Fixed error with filter keyboard tests `can?` already includes the `feature_available?` check Test there is no Merge Request button when MRs are disabled Ensure the correct Merge Request button is found Add 409 conflict tests Add CHANGELOG ...
| * | | Fix tests to use the new APILin Jen-Shin2016-12-082-5/+11
| | | |
* | | | Reduce the number of loops that Cycle Analytics specs users-why-five-times-surely-twice-is-enoughRobert Speicher2017-02-016-74/+50
| |_|/ |/| | | | | | | | See https://gitlab.com/gitlab-org/gitlab-ce/issues/27402
* | | Use `:empty_project` where possible in model specsrs-empty_project-modelsRobert Speicher2017-01-267-7/+8
| |/ |/|
* | refactor fetcher and fixed specsJames Lopez2017-01-177-20/+20
| |
* | Fix other spec failuresJames Lopez2017-01-171-59/+0
| |
* | Fix other spec failuresJames Lopez2017-01-171-1/+1
| |
* | more refactoring and fixing old specsJames Lopez2017-01-178-16/+16
|/
* Merge branch 'jej-fix-missing-access-check-on-issues' into 'security'Douwe Maan2016-11-288-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Fix missing access checks on issue lookup using IssuableFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 :warning: - Potentially untested :bomb: - No test coverage :traffic_light: - Test coverage of some sort exists (a test failed when error raised) :vertical_traffic_light: - Test coverage of return value (a test failed when nil used) :white_check_mark: - Permissions check tested - [x] :white_check_mark: app/controllers/projects/branches_controller.rb:39 - `before_action :authorize_push_code!` helpes limit/prevent exploitation. Always checks for reporter access so fine with confidential issues, issues only visible to team, etc. - [x] :traffic_light: app/models/cycle_analytics/summary.rb:9 [`.count`] - [x] :white_check_mark: app/controllers/projects/todos_controller.rb:19 - [x] Potential double render in app/controllers/projects/todos_controller.rb - https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#cedccb227af9bfdf88802767cb58d43c2b977439_24_24 See merge request !2030
* fixed newlineJames Lopez2016-10-121-1/+0
|
* Ignore deployment for statistics in Cycle Analytics, except in staging and ↵James Lopez2016-10-125-39/+62
| | | | | | production stages Also, updated specs and docs.
* Fix the "Commits" section of the cycle analytics summary.Timothy Andrew2016-09-261-0/+6
| | | | | | | | | - The commit count was capped at 10, due to `Gitlab::Git::Repository#log` enforcing a limit, with the default set to 10. - Reimplement a small portion of this `log` function to get just the data we need.
* Implement a second round of review comments from @DouweM.Timothy Andrew2016-09-217-87/+149
| | | | | | | | | | | | | | - 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.
* Fix rubocop spec.Timothy Andrew2016-09-201-2/+6
| | | | And `scss_lint`
* Fix all cycle analytics specs.Timothy Andrew2016-09-205-9/+61
| | | | | A number of failures were introduced due to performance improvements (like pre-calculating metrics).
* Test the `CycleAnalytics::Summary` model.Timothy Andrew2016-09-201-0/+53
|
* Consolidate all cycle analytics helper methods.Timothy Andrew2016-09-076-123/+0
| | | | | | | 1. Move the test generation to `CycleAnalyticsHelpers::TestGeneration` 2. Move all helper methods (previously placed in each individual spec file) to `CycleAnalyticsHelpers`
* Test the `test` cycle analytics phase.Timothy Andrew2016-09-071-0/+90
|
* Test the `production` cycle analytics phase.Timothy Andrew2016-09-071-0/+81
| | | | | | | Add a `before_end_fn` option to the code that generates cycle analytics specs. `before_end_fn` is called before the end conditions are. Used for data setup that needs to be called after the start conditions and before the end conditions.
* Test the `staging` cycle analytics phase.Timothy Andrew2016-09-071-0/+79
| | | | | | | | | | | | | | Remove overlap from the "start + end" durations in the happy test case. For the `staging` phase, the end time is the _first_ deployment that happens after the MR merge. If we have 5 MRs where the `start_time`s (merge time) are the same, and all the `end_time`s (deploy to production) a few days from now, only the earliest deploy will get picked up, because that consitutes a deploy for _all_ the MRs. We fix this by removing overlap. Every `start_time` is now generated to be _after_ the preceding `end_time`.
* Generate branch/file names more randomly to avoid failures.Timothy Andrew2016-09-073-6/+5
| | | | | - Tests would randomly fail because of naming conflicts. - Use a `random_git_name` method instead of using `FFaker` directly.
* Test the 'review' cycle analytics phase.Timothy Andrew2016-09-071-0/+45
|
* Test the `code` cycle analytics phase.Timothy Andrew2016-09-073-25/+46
| | | | | - Move the "data belongs to other project" test case into the generated tests, and remove the explicit tests from the `code` and `plan` phases.
* Refactor cycle analytics specs.Timothy Andrew2016-09-022-180/+37
| | | | | | | | | | | 1. Generalise the specs that will be common across all cycle analytics phases. 2. Rewrite specs `issue` and `plan` to use this abstracted testing strategy. 3. Specs that are specific to a given phase, or unwieldy to test in an abstracted manner, are added to each phase's spec.
* Add tests for the `plan` cycle analytics phase.Timothy Andrew2016-09-022-63/+188
| | | | Clean up the `issue` tests as well
* Fetch cycle analytics data for a specific date range.Timothy Andrew2016-08-261-11/+25
| | | | | | | | | 1. Supported date ranges are 30 / 90 days ago. The default is 90 days ago. 2. All issues created before "x days ago" are filtered out, even if they have other related data (test runs, merge requests) within the filter range.
* Scope Cycle Analytics queries to a projectTimothy Andrew2016-08-261-8/+13
|
* Add a spec for the `CycleAnalytics#issue` method.Timothy Andrew2016-08-261-0/+80