Commit Graph

18 Commits

Author SHA1 Message Date
Małgorzata Ksionek beaa635306 Add class for group level analytics
Add specs for group level

Update entities

Update base classes

Add groups-centric changes

Update plan and review stage

Add summary classes

Add summary spec

Update specs files

Add to specs test cases for group

Add changelog entry

Add group serializer

Fix typo

Fix typo

Add fetching namespace in sql query

Update specs

Add rubocop fix

Add rubocop fix

Modify method to be in sync with code review

Add counting deploys from subgroup

To group summary stage

Add subgroups handling

In group stage summary

Add additional spec

Add additional specs

Add more precise inheritance

Add attr reader to group level

Fix rubocop offence

Fix problems with specs

Add cr remarks

Renaming median method and a lot of calls in specs

Move spec setup

Rename method in specs

Add code review remarks regarding module

Add proper module name
2019-07-15 15:06:40 +02:00
Małgorzata Ksionek c5e2c1ca70 Add newline before subject
Fix rubocop offences
2019-07-10 14:45:35 +02:00
Małgorzata Ksionek 3459ba13b2 Add cr remarks 2019-07-09 12:16:38 +02:00
Małgorzata Ksionek ae2514d0a1 Update class calls 2019-07-09 12:16:37 +02:00
Thong Kuah a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00
Tiago Botelho 522f4b2c6a Adapt cycle analytics spec helper and cycle analytics usage data spec 2018-03-01 16:43:26 +00:00
Keifer Furzland 7e113b6824 Remove superfluous type defs in specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:52 +02:00
Robert Speicher dd1c410ea4 Reduce the number of loops that Cycle Analytics specs use
See https://gitlab.com/gitlab-org/gitlab-ce/issues/27402
2017-02-01 16:14:20 -05:00
Robert Speicher fcb37542e7 Use `:empty_project` where possible in model specs 2017-01-26 17:44:59 -05:00
James Lopez 69ecd951a9 refactor fetcher and fixed specs 2017-01-17 11:32:55 +01:00
James Lopez 02e1e48192 more refactoring and fixing old specs 2017-01-17 11:32:54 +01:00
Douwe Maan 6d37fe952b Merge branch 'jej-fix-missing-access-check-on-issues' into 'security'
Fix missing access checks on issue lookup using IssuableFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

⚠️ - Potentially untested
💣 - No test coverage
🚥 - Test coverage of some sort exists (a test failed when error raised)
🚦 - Test coverage of return value (a test failed when nil used)
 - Permissions check tested

- [x]  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] 🚥 app/models/cycle_analytics/summary.rb:9 [`.count`]
- [x]  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
2016-11-28 21:25:46 -03:00
James Lopez 2b37f040b6 Ignore deployment for statistics in Cycle Analytics, except in staging and production stages
Also, updated specs and docs.
2016-10-12 12:32:25 +02:00
Timothy Andrew 918e589c2b Implement a second round of review comments from @DouweM.
- 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-21 00:47:37 +05:30
Timothy Andrew d0e101e997 Fix all cycle analytics specs.
A number of failures were introduced due to performance
improvements (like pre-calculating metrics).
2016-09-20 13:23:14 +05:30
Timothy Andrew 0a767f7b61 Consolidate all cycle analytics helper methods.
1. Move the test generation to `CycleAnalyticsHelpers::TestGeneration`

2. Move all helper methods (previously placed in each individual spec
   file) to `CycleAnalyticsHelpers`
2016-09-07 14:29:12 +05:30
Timothy Andrew 0f44c5a56f Generate branch/file names more randomly to avoid failures.
- Tests would randomly fail because of naming conflicts.
- Use a `random_git_name` method instead of using `FFaker` directly.
2016-09-07 11:26:07 +05:30
Timothy Andrew 71a9bcd3de Test the 'review' cycle analytics phase. 2016-09-07 11:25:50 +05:30