summaryrefslogtreecommitdiff
path: root/spec/controllers/projects/environments_controller_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Move BaseService to Services directorySarah Yasonik2019-07-291-1/+1
| | | | | | | | In preparation for embedding specific metrics in issues https://gitlab.com/gitlab-org/gitlab-ce/issues/62971, this commit moves the BaseService for metrics dashboards to a new services subdirectory. This is purely for the sake of organization and maintainability.
* Refactor EnvironmentsController#metrics_dashboard endpointSarah Yasonik2019-07-161-71/+128
|
* Add embedding flag and filter to CPU/MemSarah Yasonik2019-06-201-0/+13
| | | | | | | | | | | This commits adds support for metrics dashboards for embedding. If the flag 'embedded' is provided to the environments/id/metrics_dashboard endpoint, the response will be suitable for embedding in issues or other content. This is a precursor for support for embedding metrics in GFM.
* Remove metrics_time_window feature flagSarah Yasonik2019-06-071-14/+0
|
* Require time window params in metrics dashboardSarah Yasonik2019-05-201-12/+10
|
* Update metrics dashboard API to load yml from repoSarah Yasonik2019-05-011-7/+84
| | | | | | | | | | | Updates the EnvironmentController#metrics_dashboard endpoint to support a "dashboard" param, which can be used to specify the filepath of a dashboard configuration from a project repository. Dashboard configurations are expected to be stored in .gitlab/dashboards/. Updates dashboard post-processing steps to exclude custom metrics, which should only display on the system dashboard.
* Load environment metrics only for JSON endpointPeter Leitzen2019-04-291-4/+4
| | | | | | | | When showing the HTML version of the environment metrics we don't need to fetch their metrics because we don't use them anymore on the HTML version. We use additional_metrics.json endpoint now.
* Prefer safe_load and deep_symbolize_keyssyasonik2019-04-251-1/+1
|
* Defend against dashboard errors, rework sequencesyasonik2019-04-241-0/+13
|
* Inherit from BaseServicerpereira22019-04-241-2/+2
| | | | | Change MetricsDashboard::Service to inherit from BaseService so that it can reuse methods like initialize, success, error.
* Add unit tests and fix broken endpointsyasonik2019-04-241-0/+24
|
* Add some frozen string to spec/**/*.rbgfyoung2019-04-151-0/+2
| | | | | | | | | | Adds frozen string to the following: * spec/bin/**/*.rb * spec/config/**/*.rb * spec/controllers/**/*.rb xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
* Resolve Environments#additional_metrics TypeError, ensure unix formatSarah Yasonik2019-04-091-0/+11
|
* Renamed terminal_specification to channel_specificationFrancisco Javier López2019-04-041-1/+1
| | | | | | We're moving from using terminology related to terminals when we refer to Websockets connections in Workhorse. It's more appropiate a concept like channel.
* Specify time window for additional metrics apisupport-time-windows-apisyasonik2019-04-031-2/+32
| | | | | | | | | Adds support for start and end parameters in the #additional_metrics endpoint of the EnvironmentsController. start and end are meant to be unix timestamps, per the Prometheus API (as the consumer of this endpoint will eventually be transitioned to a prometheus endpoint). This functionality is behind the :metrics_time_window feature flag for development.
* Add name_without_type to environments.jsonVladimir Shushlin2019-02-261-5/+5
| | | | It's needed to show shorter names in environments "folders"
* Inroduce Internal API for searching environment namesintroduce-environment-search-endpointShinya Maeda2019-02-061-0/+73
| | | | | | | | | | | | Add changelog Rename word to query User hash for limit Do not allow control limit Rename pluck names and add more specs
* Support flat response for envs index routesyasonik2019-01-211-7/+36
| | | | | | | | | | | | | To support environment folders in the UI on the Environments List page, the environments index route previously returned one environment per folder, excluding those other than the latest deploy. However, the environtments dropdown on the metrics dashboard requires that any environment be selectable. To accommodate both use cases, support an optional 'nested' parameter in the index route to return either a flat, complete response or a nested response based on the use case in question. The new default response structure is the flat response.
* Update specs to rails5 formatblackst0ne-convert-specs-rails5-styleblackst0ne2018-12-191-30/+34
| | | | | | | | | | Updates specs to use new rails5 format. The old format: `get :show, { some: params }, { some: headers }` The new format: `get :show, params: { some: params }, headers: { some: headers }`
* Fix Environment terminal specs for EEYorick Peterse2018-11-291-2/+7
| | | | | | | | | | | | | | In EE we redefine Environment#terminals, which makes it impossible to use `allow_any_instance_of(Environment)` or `expect_any_instance_of(Environment)`. Other approaches of stubbing this class, such as by stubbing `new`, only result in spec failures. To solve this issue, we add a simple `defined?(EE)` check in the tests to change the thing that we are testing. This is rather obnoxious, because it requires EE knowledge in CE, and can break if `EE::Environment` is removed without updating CE. Unfortunately, it appears to be the only solution we have apart from modifying these tests in EE (which would cause merge conflicts).
* Fix typos in comments and specsGeorge Tsiolis2018-11-011-1/+1
|
* Resolve "Rename the `Master` role to `Maintainer`" BackendMark Chao2018-07-111-1/+1
|
* Fixes backend specsTiago Botelho2018-07-021-2/+2
|
* Remove GET empty from EnvironmentsControllerTiago Botelho2018-06-291-11/+2
|
* Prevents project first environment from being fetched in every project viewTiago Botelho2018-06-281-0/+18
|
* Specify environment actions to distinguish between metrics and every other ↵Tiago Botelho2018-06-261-0/+10
| | | | environment related actions
* Reduce CE/EE diff in spec/controllers/projects/environments_controller_spec.rbRémy Coutable2018-05-241-0/+7
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Refactor `have_http_status` into `have_gitlab_http_status` in the specsJacopo2017-10-201-13/+13
|
* Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-1/+1
|
* Re-enable polling for environmentsenable-polling-envFilipa Lacerda2017-07-061-4/+2
|
* Create and use project path helpers that only need a project, no namespaceDouwe Maan2017-07-051-2/+2
|
* Merge remote-tracking branch 'upstream/master' into ↵28717-additional-metrics-review-branchPawel Chojnacki2017-06-221-10/+12
|\ | | | | | | 28717-additional-metrics-review-branch
| * Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-8/+8
| |
| * Disable environment list polling as it breaks deployboardKamil Trzcinski2017-06-211-2/+4
| |
* | cleanup wipPawel Chojnacki2017-06-161-5/+7
| |
* | Merge remote-tracking branch 'upstream/master' into ↵Pawel Chojnacki2017-06-071-2/+7
|\ \ | |/ | | | | | | | | | | | | 28717-additional-metrics-review-branch # Conflicts: # app/models/project_services/prometheus_service.rb # app/views/projects/services/_form.html.haml
| * Merge branch 'master' into zj-realtime-env-listZ.J. van de Weg2017-06-011-2/+2
| |\
| | * Use - as the prefix so we don't conflict with namespacesLin Jen-Shin2017-05-261-2/+2
| | | | | | | | | | | | | | | The decision was made around: https://gitlab.com/gitlab-org/gitlab-ce/issues/26407#note_30624641
| | * Merge remote-tracking branch 'upstream/master' into rename-builds-controllerLin Jen-Shin2017-05-261-7/+12
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (307 commits) Address feedback Add small update for the i18n guide. update webpack to v2.6.1 patch release to fix "Can't find variable: Promise" error update webpack-bundle-analyzer past v2.4.1 to support NamedChunksPlugin name all webpack chunks to improve long term cacheability add NameAllModulesPlugin to cover shortcomings of NamedModulesPlugin upgrade to latest webpack version Only use DROP INDEX CONCURRENTLY on postgreql 9.2+ Provide default for calculating label text color (!11681) Add failing test for #32728 Bugfix: Always use the default language when generating emails. Remove unecessary commit pattern check Add regexp_for_value helper method Remove shared example and improve sub_group_issuables_spec.rb Remove 'should' from scenario in has_subgroup_title_spec.rb Cartfile git and binary methods cannot take a GitHub repo Fix terminals support for Kubernetes service Add review comments to compare_spec.rb Fix transient error clicking dropdown items in compare_spec.rb Use non-global jQuery reference within raven bundle ...
| | * | Rename BuildsController to JobsControllerLin Jen-Shin2017-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename other URL generators admin_builds_path -> admin_jobs_path Fix tests and more renaming Fix more tests Also change build_id to job_id in the controller
| * | | Merge branch 'master' into zj-realtime-env-listZ.J. van de Weg2017-05-251-3/+8
| |\ \ \ | | | |/ | | |/|
| * | | Test etag caching router and incorporate reviewZ.J. van de Weg2017-05-241-4/+9
| | |/ | |/|
* | | Environments#additional_metrics testsPawel Chojnacki2017-06-051-0/+40
| |/ |/|
* | Improve test wordingZ.J. van de Weg2017-05-231-7/+7
| |
* | Make sorting difference clearerZeger-Jan van de Weg2017-05-191-4/+4
| |
* | Sort environments folders when opening themZ.J. van de Weg2017-05-171-0/+5
|/ | | | Fixes gitlab-org/gitlab-ce#30814
* Merge request widget redesignFatih Acet2017-05-091-0/+42
|
* Unnecessary "include WaitForAjax" and "include ApiHelpers"Jacopo2017-04-211-2/+0
| | | | | Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs. Removed unnecessary usage of `api:true`
* Add controller specs for environment folder actionGrzegorz Bizon2017-03-271-0/+33
|
* Added Prometheus Service and Prometheus graphsKamil Trzciński2017-03-071-0/+46
|