Resolve "Add simplest happy path end-to-end test of Monitor feature"
What does this MR do?
-
Wait for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30251 hence WIP
This MR creates a end-to-end test for the ~Monitor section in which show "Cluster health" graph by doing
- Use license GitLab Ultimate
- Create a project
- Create cluster and configure cluster via Operations > Kubernetes
- Install Tiller
- Install Prometheus
- Check "Cluster health" on *Opeations > Kubernetes to show up
Refs https://gitlab.com/gitlab-org/gitlab-ee/issues/12399
Test output
Using minikube
as cluster provider:
$ CHROME_HEADLESS=no bundle exec bin/qa Test::Instance::All http://192.168.178.31:3001 -- -f d --tag kubernetes qa/specs/features/browser_ui/8_monitor/health/ee_cluster_health_spec.rb
Run options: include {:kubernetes=>true}
Randomized with seed 19910
Monitor
Cluster health graphs
checking for kubectl... yes
checking for minikube... yes
Executing `minikube stop`
! "qa-cluster-20190626125008-151887c6" VM does not exist, nothing to stop
Executing `minikube profile qa-cluster-20190626130533-7cda0c61`
* minikube profile was successfully set to qa-cluster-20190626130533-7cda0c61
Executing `minikube start`
* minikube v1.1.1 on linux (amd64)
* Creating kvm2 VM (CPUs=4, Memory=4096MB, Disk=20000MB) ...
* Configuring environment for Kubernetes v1.14.3 on Docker 18.09.6
* Pulling images ...
* Launching Kubernetes ...
* Verifying: apiserver proxy etcd scheduler controller dns
* Done! kubectl is now configured to use "qa-cluster-20190626130533-7cda0c61"
Executing `kubectl apply -f -`
serviceaccount/gitlab-account created
clusterrolebinding.rbac.authorization.k8s.io/gitlab-account-binding created
installs Kubernetes and Prometheus
Executing `minikube delete`
* Deleting "qa-cluster-20190626130533-7cda0c61" from kvm2 ...
* The "qa-cluster-20190626130533-7cda0c61" cluster has been deleted.
Top 1 slowest examples (233.03 seconds, 49.7% of total time):
Monitor Cluster health graphs installs Kubernetes and Prometheus
233.03 seconds ./qa/specs/features/browser_ui/8_monitor/health/ee_cluster_health_spec.rb:17
Finished in 7 minutes 49 seconds (files took 2.77 seconds to load)
1 example, 0 failures
Randomized with seed 19910
Screen capture
Captured |
---|
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Leitzen