summaryrefslogtreecommitdiff
path: root/spec/support/cycle_analytics_helpers.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix cycle analytics specsGrzegorz Bizon2017-11-061-0/+1
|
* Fix specShinya Maeda2017-09-031-2/+2
|
* Fix specShinya Maeda2017-09-031-2/+4
|
* Fix cycle analytics test data generation and specsGrzegorz Bizon2017-08-231-0/+2
|
* Move some after_create parts to worker to improve performance32844-issuables-performanceJarka Kadlecova2017-08-071-1/+3
|
* Use a previous approach for cycle analytics dummy pipelineGrzegorz Bizon2017-07-051-3/+2
|
* Fix cycle analytics tests by making pipeline validLin Jen-Shin2017-07-051-1/+4
|
* Follow feedback on the merge requestLin Jen-Shin2017-07-041-3/+1
|
* Give project to the dummy pipelineLin Jen-Shin2017-07-031-1/+3
|
* Make sure that environment was created before deployingLin Jen-Shin2017-06-021-0/+2
|
* Fix other use of CreateDeploymentService and makeLin Jen-Shin2017-06-021-6/+35
| | | | | it a bit more robust against missing options, which we did guard on for some cases.
* Cycle analytics specs needed Commit to reference issue28359-skip-process-commit-worker-unless-issues-referencedJames Edwards-Jones2017-05-041-2/+2
| | | The plan stage both measures time taken and lists related commits. We test for commits being listed, so needed to actually mention the issue in them. An alternative would have been adding “allow_any_instance_of(Commit).to receive(:matches_cross_reference_regex?).and_return(true)” but this felt too coupled to implementation.
* Fix brittle specsRémy Coutable2017-04-031-2/+2
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Don't use FFaker in factories, use sequences insteadRémy Coutable2017-04-031-7/+5
| | | | | | | 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-241-4/+3
|
* Consistently create, update, and delete files, taking CRLF settings into accountDouwe Maan2017-02-241-8/+1
|
* Fix tests to use the new APILin Jen-Shin2016-12-081-1/+7
|
* Merge branch 'issue_23548_dev' into 'master'Douwe Maan2016-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | disable markdown in comments when referencing disabled features fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23548 This MR prevents the following references when tool is disabled: - issues - snippets - commits - when repo is disabled - commit range - when repo is disabled - milestones This MR does not prevent references to repository files, since they are just markdown links and don't leak information. See merge request !2011 Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix the "Commits" section of the cycle analytics summary.Timothy Andrew2016-09-261-11/+15
| | | | | | | | | - 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.
* Fix all cycle analytics specs.Timothy Andrew2016-09-201-6/+9
| | | | | A number of failures were introduced due to performance improvements (like pre-calculating metrics).
* Test the `CycleAnalytics::Summary` model.Timothy Andrew2016-09-201-3/+23
|
* Consolidate all cycle analytics helper methods.Timothy Andrew2016-09-071-141/+30
| | | | | | | 1. Move the test generation to `CycleAnalyticsHelpers::TestGeneration` 2. Move all helper methods (previously placed in each individual spec file) to `CycleAnalyticsHelpers`
* Add a test case for "end condition happens before start condition".Timothy Andrew2016-09-071-0/+21
| | | | - In the cycle analytics specs.
* Test the `production` cycle analytics phase.Timothy Andrew2016-09-071-1/+5
| | | | | | | 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-4/+4
| | | | | | | | | | | | | | 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`.
* Test the `code` cycle analytics phase.Timothy Andrew2016-09-071-0/+31
| | | | | - 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-021-0/+96
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.