+
+
+
## Scan result policy editor
diff --git a/doc/user/clusters/integrations.md b/doc/user/clusters/integrations.md
index 74f6ec283ea..200bd74cac5 100644
--- a/doc/user/clusters/integrations.md
+++ b/doc/user/clusters/integrations.md
@@ -15,7 +15,7 @@ GitLab provides several ways to integrate applications to your
Kubernetes cluster.
To enable cluster integrations, first add a Kubernetes cluster to a GitLab
-[project](../project/clusters/add_remove_clusters.md) or
+[project](../project/clusters/index.md) or
[group](../group/clusters/index.md) or
[instance](../instance/clusters/index.md).
diff --git a/doc/user/infrastructure/clusters/index.md b/doc/user/infrastructure/clusters/index.md
index 238d7004a6f..5af238fa91d 100644
--- a/doc/user/infrastructure/clusters/index.md
+++ b/doc/user/infrastructure/clusters/index.md
@@ -42,7 +42,6 @@ the GitLab agent model on the [agent's blueprint documentation](../../../archite
## Deprecated features
-- [Create a new cluster through cluster certificates](../../project/clusters/add_remove_clusters.md)
- [Connect an existing cluster through cluster certificates](../../project/clusters/add_existing_cluster.md)
- [Access controls](../../project/clusters/cluster_access.md)
- [GitLab-managed clusters](../../project/clusters/gitlab_managed_clusters.md)
diff --git a/doc/user/project/clusters/add_existing_cluster.md b/doc/user/project/clusters/add_existing_cluster.md
index f2d537513b7..554d772b5ec 100644
--- a/doc/user/project/clusters/add_existing_cluster.md
+++ b/doc/user/project/clusters/add_existing_cluster.md
@@ -230,3 +230,22 @@ kubectl create clusterrolebinding permissive-binding \
--user=kubelet \
--group=system:serviceaccounts
```
+
+## Troubleshooting
+
+### `There was a problem authenticating with your cluster. Please ensure your CA Certificate and Token are valid`
+
+If you encounter this error while connecting a Kubernetes cluster, ensure you're
+properly pasting the service token. Some shells may add a line break to the
+service token, making it invalid. Ensure that there are no line breaks by
+pasting your token into an editor and removing any additional spaces.
+
+You may also experience this error if your certificate is not valid. To check that your certificate's
+subject alternative names contain the correct domain for your cluster's API, run this command:
+
+```shell
+echo | openssl s_client -showcerts -connect kubernetes.example.com:443 2>/dev/null |
+openssl x509 -inform pem -noout -text
+```
+
+The `-connect` argument expects a `host:port` combination. For example, `https://kubernetes.example.com` would be `kubernetes.example.com:443`.
diff --git a/doc/user/project/clusters/add_remove_clusters.md b/doc/user/project/clusters/add_remove_clusters.md
index a4f6dc325c8..8cdd1792e7f 100644
--- a/doc/user/project/clusters/add_remove_clusters.md
+++ b/doc/user/project/clusters/add_remove_clusters.md
@@ -10,60 +10,11 @@ info: To determine the technical writer assigned to the Stage/Group associated w
WARNING:
This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 14.0.
-To create a new cluster use [Infrastructure as Code](../../infrastructure/iac/index.md#create-a-new-cluster-through-iac).
-
-NOTE:
-Every new Google Cloud Platform (GCP) account receives
-[$300 in credit upon sign up](https://console.cloud.google.com/freetrial).
-In partnership with Google, GitLab is able to offer an additional $200 for new GCP
-accounts to get started with the GitLab integration with Google Kubernetes Engine.
-[Follow this link](https://cloud.google.com/partners/partnercredit/?pcn_code=0014M00001h35gDQAQ#contact-form)
-to apply for credit.
-
-NOTE:
-Watch the webcast [Scalable app deployment with GitLab and Google Cloud Platform](https://about.gitlab.com/webcast/scalable-app-deploy/)
-and learn how to spin up a Kubernetes cluster managed by Google Cloud Platform (GCP)
-in a few clicks.
-
-## Create new cluster
-
-> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 14.0.
-
-As of GitLab 14.0, use [Infrastructure as Code](../../infrastructure/iac/index.md#create-a-new-cluster-through-iac)
-to **safely create new clusters from GitLab**.
-
-Creating clusters from GitLab using cluster certificates is still available on the
-GitLab UI but was **deprecated** in GitLab 14.0 and is scheduled for removal in
-GitLab 15.0. We don't recommend using this method.
-
-You can create a new cluster hosted in EKS, GKE, on premises, and with other
-providers using cluster certificates:
-
-- [New cluster hosted on Google Kubernetes Engine (GKE)](add_gke_clusters.md).
-- [New cluster hosted on Amazon Elastic Kubernetes Service (EKS)](add_eks_clusters.md).
-
-To host them on premises and with other providers, you can use Terraform
-or your preferred tool of choice to create and connect a cluster with GitLab.
-The [GitLab Terraform provider](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/project_cluster)
-supports connecting existing clusters using the certificate-based connection method.
-
-## Add existing cluster
-
-As of GitLab 14.0, use the [GitLab agent](../../clusters/agent/index.md)
-to connect your cluster to GitLab.
-
-Alternatively, you can [add an existing cluster](add_existing_cluster.md)
-through the certificate-based method, but we don't recommend using this method for [security implications](../../infrastructure/clusters/connect/index.md#security-implications-for-clusters-connected-with-certificates).
-
-## Configure your cluster
-
-As of GitLab 14.0, use the [GitLab agent](../../clusters/agent/index.md)
-to configure your cluster.
+To create and manage a new cluster use [Infrastructure as Code](../../infrastructure/iac/index.md#create-a-new-cluster-through-iac).
## Disable a cluster
-When you successfully create a new Kubernetes cluster or add an existing
-one to GitLab, the cluster connection to GitLab becomes enabled. To disable it:
+When you successfully connect an existing cluster using cluster certificates, the cluster connection to GitLab becomes enabled. To disable it:
1. Go to your:
- Project's **{cloud-gear}** **Infrastructure > Kubernetes clusters** page, for a project-level cluster.
@@ -95,26 +46,3 @@ To remove the Kubernetes cluster integration:
1. Go to your cluster details page.
1. Select the **Advanced Settings** tab.
1. Select either **Remove integration** or **Remove integration and resources**.
-
-## Access controls
-
-See [cluster access controls (RBAC or ABAC)](cluster_access.md).
-
-## Troubleshooting
-
-### There was a problem authenticating with your cluster. Please ensure your CA Certificate and Token are valid
-
-If you encounter this error while adding a Kubernetes cluster, ensure you're
-properly pasting the service token. Some shells may add a line break to the
-service token, making it invalid. Ensure that there are no line breaks by
-pasting your token into an editor and removing any additional spaces.
-
-You may also experience this error if your certificate is not valid. To check that your certificate's
-subject alternative names contain the correct domain for your cluster's API, run this:
-
-```shell
-echo | openssl s_client -showcerts -connect kubernetes.example.com:443 2>/dev/null |
-openssl x509 -inform pem -noout -text
-```
-
-Note that the `-connect` argument expects a `host:port` combination. For example, `https://kubernetes.example.com` would be `kubernetes.example.com:443`.
diff --git a/doc/user/project/clusters/cluster_access.md b/doc/user/project/clusters/cluster_access.md
index 8ff0a275649..43ceb3673d8 100644
--- a/doc/user/project/clusters/cluster_access.md
+++ b/doc/user/project/clusters/cluster_access.md
@@ -28,7 +28,7 @@ Helm also creates additional service accounts and other resources for each
installed application. Consult the documentation of the Helm charts for each application
for details.
-If you are [adding an existing Kubernetes cluster](add_remove_clusters.md#add-existing-cluster),
+If you are [adding an existing Kubernetes cluster](add_existing_cluster.md),
ensure the token of the account has administrator privileges for the cluster.
The resources created by GitLab differ depending on the type of cluster.
diff --git a/doc/user/project/clusters/gitlab_managed_clusters.md b/doc/user/project/clusters/gitlab_managed_clusters.md
index 9c5cc14f720..bab6f8cf9f2 100644
--- a/doc/user/project/clusters/gitlab_managed_clusters.md
+++ b/doc/user/project/clusters/gitlab_managed_clusters.md
@@ -17,7 +17,7 @@ To manage applications, use the [Cluster Project Management Template](../../../u
You can choose to allow GitLab to manage your cluster for you. If your cluster
is managed by GitLab, resources for your projects are automatically created. See
-the [Access controls](add_remove_clusters.md#access-controls) section for
+the [Access controls](cluster_access.md) section for
details about the created resources.
If you choose to manage your own cluster, project-specific resources aren't created
diff --git a/doc/user/project/clusters/runbooks/index.md b/doc/user/project/clusters/runbooks/index.md
index 9d623518f72..086e1fccf6c 100644
--- a/doc/user/project/clusters/runbooks/index.md
+++ b/doc/user/project/clusters/runbooks/index.md
@@ -40,8 +40,8 @@ for an overview of how this is accomplished in GitLab!
To create an executable runbook, you need:
- **Kubernetes** - A Kubernetes cluster is required to deploy the rest of the
- applications. The simplest way to get started is to add a cluster using one
- of the [GitLab integrations](../add_remove_clusters.md#create-new-cluster).
+ applications. The simplest way to get started is to connect a cluster using the
+ [GitLab agent](../../../clusters/agent/index.md).
- **Ingress** - Ingress can provide load balancing, SSL termination, and name-based
virtual hosting. It acts as a web proxy for your applications.
- **JupyterHub** - [JupyterHub](https://jupyterhub.readthedocs.io/) is a multi-user
diff --git a/lib/gitlab/ci/pipeline/metrics.rb b/lib/gitlab/ci/pipeline/metrics.rb
index b5e48f210ad..33b9ac9b641 100644
--- a/lib/gitlab/ci/pipeline/metrics.rb
+++ b/lib/gitlab/ci/pipeline/metrics.rb
@@ -46,7 +46,7 @@ module Gitlab
name = :gitlab_ci_active_jobs
comment = 'Total amount of active jobs'
labels = { plan: nil }
- buckets = [0, 200, 500, 1_000, 2_000, 5_000, 10_000]
+ buckets = [0, 200, 500, 1_000, 2_000, 5_000, 10_000, 15_000, 20_000, 30_000, 40_000]
::Gitlab::Metrics.histogram(name, comment, labels, buckets)
end
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 5311e9edbdc..0cdece3990d 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -3827,9 +3827,6 @@ msgstr ""
msgid "Amazon Web Services Logo"
msgstr ""
-msgid "Amazon authentication is not %{link_start}correctly configured%{link_end}. Ask your GitLab administrator if you want to use this service."
-msgstr ""
-
msgid "An %{link_start}alert%{link_end} with the same fingerprint is already open. To change the status of this alert, resolve the linked alert."
msgstr ""
@@ -5313,9 +5310,6 @@ msgstr ""
msgid "Authenticated web requests"
msgstr ""
-msgid "Authenticating"
-msgstr ""
-
msgid "Authentication"
msgstr ""
@@ -8186,12 +8180,6 @@ msgstr ""
msgid "ClusterAgents|Create a cluster"
msgstr ""
-msgid "ClusterAgents|Create a cluster (certificate - deprecated)"
-msgstr ""
-
-msgid "ClusterAgents|Create a cluster (deprecated)"
-msgstr ""
-
msgid "ClusterAgents|Create agent access token"
msgstr ""
@@ -8428,9 +8416,6 @@ msgstr ""
msgid "ClusterIntegration|Advanced options on this Kubernetes cluster’s integration"
msgstr ""
-msgid "ClusterIntegration|Allow GitLab to manage namespace and service accounts for this cluster. %{linkStart}More information%{linkEnd}"
-msgstr ""
-
msgid "ClusterIntegration|Allow GitLab to manage namespaces and service accounts for this cluster."
msgstr ""
@@ -8443,18 +8428,6 @@ msgstr ""
msgid "ClusterIntegration|Amazon EKS"
msgstr ""
-msgid "ClusterIntegration|An error occurred when trying to contact the Google Cloud API. Please try again later."
-msgstr ""
-
-msgid "ClusterIntegration|An error occurred while trying to fetch project zones: %{error}"
-msgstr ""
-
-msgid "ClusterIntegration|An error occurred while trying to fetch your projects: %{error}"
-msgstr ""
-
-msgid "ClusterIntegration|An error occurred while trying to fetch zone machine types: %{error}"
-msgstr ""
-
msgid "ClusterIntegration|An unknown error occurred while attempting to connect to Kubernetes."
msgstr ""
@@ -8464,12 +8437,6 @@ msgstr ""
msgid "ClusterIntegration|Apply for credit"
msgstr ""
-msgid "ClusterIntegration|Authenticate with AWS"
-msgstr ""
-
-msgid "ClusterIntegration|Authenticate with Amazon Web Services"
-msgstr ""
-
msgid "ClusterIntegration|Authentication Error"
msgstr ""
@@ -8491,15 +8458,6 @@ msgstr ""
msgid "ClusterIntegration|Check your token"
msgstr ""
-msgid "ClusterIntegration|Choose the %{linkStart}security group%{linkEnd} to apply to the EKS-managed Elastic Network Interfaces that are created in your worker node subnets."
-msgstr ""
-
-msgid "ClusterIntegration|Choose the %{linkStart}subnets %{linkEnd} in your VPC where your worker nodes will run."
-msgstr ""
-
-msgid "ClusterIntegration|Choose the worker node %{linkStart}instance type%{linkEnd}."
-msgstr ""
-
msgid "ClusterIntegration|Choose which of your environments will use this cluster."
msgstr ""
@@ -8509,9 +8467,6 @@ msgstr ""
msgid "ClusterIntegration|Clear the local cache of namespace and service accounts."
msgstr ""
-msgid "ClusterIntegration|Cluster Region"
-msgstr ""
-
msgid "ClusterIntegration|Cluster management project"
msgstr ""
@@ -8539,57 +8494,21 @@ msgstr ""
msgid "ClusterIntegration|Copy Kubernetes cluster name"
msgstr ""
-msgid "ClusterIntegration|Could not load IAM roles"
-msgstr ""
-
-msgid "ClusterIntegration|Could not load Key Pairs"
-msgstr ""
-
-msgid "ClusterIntegration|Could not load VPCs for the selected region"
-msgstr ""
-
-msgid "ClusterIntegration|Could not load instance types"
-msgstr ""
-
-msgid "ClusterIntegration|Could not load networks"
-msgstr ""
-
-msgid "ClusterIntegration|Could not load security groups for the selected VPC"
-msgstr ""
-
-msgid "ClusterIntegration|Could not load subnets for the selected VPC"
-msgstr ""
-
-msgid "ClusterIntegration|Could not load subnetworks"
-msgstr ""
-
-msgid "ClusterIntegration|Create Kubernetes cluster"
-msgstr ""
-
msgid "ClusterIntegration|Create a Kubernetes cluster"
msgstr ""
-msgid "ClusterIntegration|Creating Kubernetes cluster"
-msgstr ""
-
msgid "ClusterIntegration|Deletes all GitLab resources attached to this cluster during removal"
msgstr ""
msgid "ClusterIntegration|Deploy each environment to its own namespace. Otherwise, environments within a project share a project-wide namespace. Note that anyone who can trigger a deployment of a namespace can read its secrets. If modified, existing environments will use their current namespaces until the cluster cache is cleared."
msgstr ""
-msgid "ClusterIntegration|Deploy each environment to its own namespace. Otherwise, environments within a project share a project-wide namespace. Note that anyone who can trigger a deployment of a namespace can read its secrets. If modified, existing environments will use their current namespaces until the cluster cache is cleared. %{linkStart}More information%{linkEnd}"
-msgstr ""
-
msgid "ClusterIntegration|Did you know?"
msgstr ""
msgid "ClusterIntegration|Elastic Kubernetes Service"
msgstr ""
-msgid "ClusterIntegration|Enable Cloud Run for Anthos"
-msgstr ""
-
msgid "ClusterIntegration|Enable Elastic Stack integration"
msgstr ""
@@ -8608,12 +8527,6 @@ msgstr ""
msgid "ClusterIntegration|Enter new Service Token"
msgstr ""
-msgid "ClusterIntegration|Enter the details for your Amazon EKS Kubernetes cluster"
-msgstr ""
-
-msgid "ClusterIntegration|Enter the details for your Kubernetes cluster"
-msgstr ""
-
msgid "ClusterIntegration|Enter your Kubernetes cluster certificate details"
msgstr ""
@@ -8641,15 +8554,6 @@ msgstr ""
msgid "ClusterIntegration|Failed to run Kubeclient: %{message}"
msgstr ""
-msgid "ClusterIntegration|Fetching machine types"
-msgstr ""
-
-msgid "ClusterIntegration|Fetching projects"
-msgstr ""
-
-msgid "ClusterIntegration|Fetching zones"
-msgstr ""
-
msgid "ClusterIntegration|GitLab Integration"
msgstr ""
@@ -8662,18 +8566,12 @@ msgstr ""
msgid "ClusterIntegration|GitLab-managed cluster"
msgstr ""
-msgid "ClusterIntegration|Google Cloud Platform project"
-msgstr ""
-
msgid "ClusterIntegration|Google GKE"
msgstr ""
msgid "ClusterIntegration|Google Kubernetes Engine"
msgstr ""
-msgid "ClusterIntegration|Google Kubernetes Engine project"
-msgstr ""
-
msgid "ClusterIntegration|Group cluster"
msgstr ""
@@ -8689,9 +8587,6 @@ msgstr ""
msgid "ClusterIntegration|Instance cluster"
msgstr ""
-msgid "ClusterIntegration|Instance type"
-msgstr ""
-
msgid "ClusterIntegration|Integration disabled"
msgstr ""
@@ -8701,9 +8596,6 @@ msgstr ""
msgid "ClusterIntegration|Integrations allow you to use applications installed in your cluster as part of your GitLab workflow."
msgstr ""
-msgid "ClusterIntegration|Key pair name"
-msgstr ""
-
msgid "ClusterIntegration|Kubernetes cluster is being created..."
msgstr ""
@@ -8713,18 +8605,6 @@ msgstr ""
msgid "ClusterIntegration|Kubernetes cluster was successfully created."
msgstr ""
-msgid "ClusterIntegration|Kubernetes version"
-msgstr ""
-
-msgid "ClusterIntegration|Kubernetes version not found"
-msgstr ""
-
-msgid "ClusterIntegration|Learn more about %{help_link_start_machine_type}machine types%{help_link_end} and %{help_link_start_pricing}pricing%{help_link_end}."
-msgstr ""
-
-msgid "ClusterIntegration|Learn more about %{help_link_start}zones%{help_link_end}."
-msgstr ""
-
msgid "ClusterIntegration|Learn more about Kubernetes."
msgstr ""
@@ -8734,93 +8614,18 @@ msgstr ""
msgid "ClusterIntegration|Learn more about instance Kubernetes clusters"
msgstr ""
-msgid "ClusterIntegration|Loading IAM Roles"
-msgstr ""
-
-msgid "ClusterIntegration|Loading Key Pairs"
-msgstr ""
-
-msgid "ClusterIntegration|Loading VPCs"
-msgstr ""
-
-msgid "ClusterIntegration|Loading instance types"
-msgstr ""
-
-msgid "ClusterIntegration|Loading networks"
-msgstr ""
-
-msgid "ClusterIntegration|Loading security groups"
-msgstr ""
-
-msgid "ClusterIntegration|Loading subnets"
-msgstr ""
-
-msgid "ClusterIntegration|Loading subnetworks"
-msgstr ""
-
-msgid "ClusterIntegration|Machine type"
-msgstr ""
-
msgid "ClusterIntegration|Make sure your API endpoint is correct"
msgstr ""
-msgid "ClusterIntegration|Make sure your account %{link_to_requirements} to create Kubernetes clusters"
-msgstr ""
-
msgid "ClusterIntegration|Manage your Kubernetes cluster by visiting %{provider_link}"
msgstr ""
msgid "ClusterIntegration|Namespace per environment"
msgstr ""
-msgid "ClusterIntegration|No IAM Roles found"
-msgstr ""
-
-msgid "ClusterIntegration|No Key Pairs found"
-msgstr ""
-
-msgid "ClusterIntegration|No VPCs found"
-msgstr ""
-
-msgid "ClusterIntegration|No instance type found"
-msgstr ""
-
-msgid "ClusterIntegration|No machine types matched your search"
-msgstr ""
-
-msgid "ClusterIntegration|No networks found"
-msgstr ""
-
-msgid "ClusterIntegration|No projects found"
-msgstr ""
-
-msgid "ClusterIntegration|No projects matched your search"
-msgstr ""
-
-msgid "ClusterIntegration|No security group found"
-msgstr ""
-
-msgid "ClusterIntegration|No subnet found"
-msgstr ""
-
-msgid "ClusterIntegration|No subnetworks found"
-msgstr ""
-
-msgid "ClusterIntegration|No zones matched your search"
-msgstr ""
-
msgid "ClusterIntegration|Node calculations use the Kubernetes Metrics API. Make sure your cluster has metrics installed"
msgstr ""
-msgid "ClusterIntegration|Number of nodes"
-msgstr ""
-
-msgid "ClusterIntegration|Number of nodes must be a numerical value."
-msgstr ""
-
-msgid "ClusterIntegration|Please make sure that your Google account meets the following requirements:"
-msgstr ""
-
msgid "ClusterIntegration|Project cluster"
msgstr ""
@@ -8833,18 +8638,9 @@ msgstr ""
msgid "ClusterIntegration|Provider details"
msgstr ""
-msgid "ClusterIntegration|Provision Role ARN"
-msgstr ""
-
msgid "ClusterIntegration|RBAC-enabled cluster"
msgstr ""
-msgid "ClusterIntegration|Read our %{linkStart}help page%{linkEnd} on Kubernetes cluster integration."
-msgstr ""
-
-msgid "ClusterIntegration|Read our %{link_start}help page%{link_end} on Kubernetes cluster integration."
-msgstr ""
-
msgid "ClusterIntegration|Remove Kubernetes cluster integration"
msgstr ""
@@ -8869,120 +8665,12 @@ msgstr ""
msgid "ClusterIntegration|Save changes"
msgstr ""
-msgid "ClusterIntegration|Search IAM Roles"
-msgstr ""
-
-msgid "ClusterIntegration|Search Key Pairs"
-msgstr ""
-
-msgid "ClusterIntegration|Search VPCs"
-msgstr ""
-
-msgid "ClusterIntegration|Search instance types"
-msgstr ""
-
-msgid "ClusterIntegration|Search machine types"
-msgstr ""
-
-msgid "ClusterIntegration|Search networks"
-msgstr ""
-
-msgid "ClusterIntegration|Search projects"
-msgstr ""
-
-msgid "ClusterIntegration|Search security groups"
-msgstr ""
-
-msgid "ClusterIntegration|Search subnets"
-msgstr ""
-
-msgid "ClusterIntegration|Search subnetworks"
-msgstr ""
-
-msgid "ClusterIntegration|Search zones"
-msgstr ""
-
-msgid "ClusterIntegration|Security group"
-msgstr ""
-
msgid "ClusterIntegration|See and edit the details for your Kubernetes cluster"
msgstr ""
-msgid "ClusterIntegration|Select a VPC"
-msgstr ""
-
-msgid "ClusterIntegration|Select a VPC to choose a security group"
-msgstr ""
-
-msgid "ClusterIntegration|Select a VPC to choose a subnet"
-msgstr ""
-
-msgid "ClusterIntegration|Select a VPC to use for your EKS Cluster resources. To use a new VPC, first create one on %{linkStart}Amazon Web Services %{linkEnd}."
-msgstr ""
-
-msgid "ClusterIntegration|Select a network"
-msgstr ""
-
-msgid "ClusterIntegration|Select a network to choose a subnetwork"
-msgstr ""
-
-msgid "ClusterIntegration|Select a region to choose a Key Pair"
-msgstr ""
-
-msgid "ClusterIntegration|Select a region to choose a VPC"
-msgstr ""
-
-msgid "ClusterIntegration|Select a security group"
-msgstr ""
-
-msgid "ClusterIntegration|Select a subnet"
-msgstr ""
-
-msgid "ClusterIntegration|Select a subnetwork"
-msgstr ""
-
-msgid "ClusterIntegration|Select a zone to choose a network"
-msgstr ""
-
-msgid "ClusterIntegration|Select an instance type"
-msgstr ""
-
-msgid "ClusterIntegration|Select key pair"
-msgstr ""
-
-msgid "ClusterIntegration|Select machine type"
-msgstr ""
-
-msgid "ClusterIntegration|Select project"
-msgstr ""
-
-msgid "ClusterIntegration|Select project and zone to choose machine type"
-msgstr ""
-
-msgid "ClusterIntegration|Select project to choose zone"
-msgstr ""
-
-msgid "ClusterIntegration|Select service role"
-msgstr ""
-
-msgid "ClusterIntegration|Select the key pair name that will be used to create EC2 nodes. To use a new key pair name, first create one on %{linkStart}Amazon Web Services%{linkEnd}."
-msgstr ""
-
-msgid "ClusterIntegration|Select the region you want to create the new cluster in. Make sure you have access to this region for your role to be able to authenticate. If no region is selected, we will use %{codeStart}DEFAULT_REGION%{codeEnd}. Learn more about %{linkStart}Regions%{linkEnd}."
-msgstr ""
-
-msgid "ClusterIntegration|Select zone"
-msgstr ""
-
-msgid "ClusterIntegration|Select zone to choose machine type"
-msgstr ""
-
msgid "ClusterIntegration|Service Token"
msgstr ""
-msgid "ClusterIntegration|Service role"
-msgstr ""
-
msgid "ClusterIntegration|Service token is required."
msgstr ""
@@ -8998,12 +8686,6 @@ msgstr ""
msgid "ClusterIntegration|Specifying a domain will allow you to use Auto Review Apps and Auto Deploy stages for %{linkStart}Auto DevOps.%{linkEnd} The domain should have a wildcard DNS configured matching the domain. "
msgstr ""
-msgid "ClusterIntegration|Subnets"
-msgstr ""
-
-msgid "ClusterIntegration|The Amazon Resource Name (ARN) associated with your role. If you do not have a provisioned role, first create one on %{awsLinkStart}Amazon Web Services %{awsLinkEnd} using the above account and external IDs. %{moreInfoStart}More information%{moreInfoEnd}"
-msgstr ""
-
msgid "ClusterIntegration|The Kubernetes certificate used to authenticate to the cluster."
msgstr ""
@@ -9016,18 +8698,12 @@ msgstr ""
msgid "ClusterIntegration|The namespace associated with your project. This will be used for deploy boards, logs, and Web terminals."
msgstr ""
-msgid "ClusterIntegration|The region the new cluster will be created in. You must reauthenticate to change regions."
-msgstr ""
-
msgid "ClusterIntegration|There was a problem authenticating with your cluster. Please ensure your CA Certificate and Token are valid."
msgstr ""
msgid "ClusterIntegration|There was an HTTP error when connecting to your cluster."
msgstr ""
-msgid "ClusterIntegration|This account must have permissions to create a Kubernetes cluster in the %{link_to_container_project} specified below"
-msgstr ""
-
msgid "ClusterIntegration|This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts."
msgstr ""
@@ -9040,24 +8716,15 @@ msgstr ""
msgid "ClusterIntegration|This process is %{issue_link_start}deprecated%{issue_link_end}. Use the %{docs_link_start}the GitLab agent for Kubernetes%{docs_link_end} instead."
msgstr ""
-msgid "ClusterIntegration|This project does not have billing enabled. To create a cluster, %{linkToBillingStart}enable billing%{linkToBillingEnd} and try again."
-msgstr ""
-
msgid "ClusterIntegration|This will permanently delete the following resources:"
msgstr ""
-msgid "ClusterIntegration|To create a cluster, first create a project on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}."
-msgstr ""
-
msgid "ClusterIntegration|To remove your integration and resources, type %{clusterName} to confirm:"
msgstr ""
msgid "ClusterIntegration|To remove your integration, type %{clusterName} to confirm:"
msgstr ""
-msgid "ClusterIntegration|To use a new project, first create one on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}."
-msgstr ""
-
msgid "ClusterIntegration|Troubleshooting tips:"
msgstr ""
@@ -9076,24 +8743,9 @@ msgstr ""
msgid "ClusterIntegration|Use the %{linkStart}GitLab agent%{linkEnd} to safely connect your Kubernetes clusters to GitLab. You can deploy your applications, run your pipelines, use Review Apps, and much more."
msgstr ""
-msgid "ClusterIntegration|Uses the Cloud Run, Istio, and HTTP Load Balancing addons for this cluster."
-msgstr ""
-
msgid "ClusterIntegration|Using AutoDevOps with multiple clusters? %{help_link_start}Read this first.%{help_link_end}"
msgstr ""
-msgid "ClusterIntegration|VPC"
-msgstr ""
-
-msgid "ClusterIntegration|Validating project billing status"
-msgstr ""
-
-msgid "ClusterIntegration|We could not verify that one of your projects on GCP has billing enabled. Please try again."
-msgstr ""
-
-msgid "ClusterIntegration|We were unable to fetch any projects. Ensure that you have a project on %{docsLinkStart}Google Cloud Platform%{docsLinkEnd}."
-msgstr ""
-
msgid "ClusterIntegration|Where do you want to create a cluster?"
msgstr ""
@@ -9103,30 +8755,9 @@ msgstr ""
msgid "ClusterIntegration|You are about to remove your cluster integration."
msgstr ""
-msgid "ClusterIntegration|You must grant access to your organization’s AWS resources in order to create a new EKS cluster. To grant access, create a provision role using the account and external ID below and provide us the ARN."
-msgstr ""
-
-msgid "ClusterIntegration|You should select at least two subnets"
-msgstr ""
-
-msgid "ClusterIntegration|Your account must have %{link_to_kubernetes_engine}"
-msgstr ""
-
msgid "ClusterIntegration|Your cluster API is unreachable. Please ensure your API URL is correct."
msgstr ""
-msgid "ClusterIntegration|Your service role is distinct from the provision role used when authenticating. It will allow Amazon EKS and the Kubernetes control plane to manage AWS resources on your behalf. To use a new role, first create one on %{linkStart}Amazon Web Services%{linkEnd}."
-msgstr ""
-
-msgid "ClusterIntegration|Zone"
-msgstr ""
-
-msgid "ClusterIntegration|access to Google Kubernetes Engine"
-msgstr ""
-
-msgid "ClusterIntegration|meets the requirements"
-msgstr ""
-
msgid "ClusterIntegration|sign up"
msgstr ""
@@ -10320,12 +9951,6 @@ msgstr ""
msgid "Copy %{type}"
msgstr ""
-msgid "Copy Account ID to clipboard"
-msgstr ""
-
-msgid "Copy External ID to clipboard"
-msgstr ""
-
msgid "Copy ID"
msgstr ""
@@ -15488,9 +15113,6 @@ msgstr ""
msgid "Exported requirements"
msgstr ""
-msgid "External ID"
-msgstr ""
-
msgid "External URL"
msgstr ""
@@ -17794,9 +17416,6 @@ msgstr ""
msgid "Google Cloud project required"
msgstr ""
-msgid "Google authentication is not %{link_start}properly configured%{link_end}. Ask your GitLab administrator if you want to use this service."
-msgstr ""
-
msgid "GoogleCloud|Cancel"
msgstr ""
@@ -34293,6 +33912,9 @@ msgstr ""
msgid "SecurityReports|Report has expired"
msgstr ""
+msgid "SecurityReports|Results show vulnerabilities introduced by the merge request, in addition to existing vulnerabilities from the latest successful pipeline in your project's default branch."
+msgstr ""
+
msgid "SecurityReports|Scan details"
msgstr ""
@@ -34563,12 +34185,6 @@ msgstr ""
msgid "Select project"
msgstr ""
-msgid "Select project and zone to choose machine type"
-msgstr ""
-
-msgid "Select project to choose zone"
-msgstr ""
-
msgid "Select project to create %{type}"
msgstr ""
diff --git a/qa/qa/ce/strategy.rb b/qa/qa/ce/strategy.rb
index 71c538c20a0..bf08f887c7d 100644
--- a/qa/qa/ce/strategy.rb
+++ b/qa/qa/ce/strategy.rb
@@ -8,6 +8,7 @@ module QA
def perform_before_hooks
# The login page could take some time to load the first time it is visited.
# We visit the login page and wait for it to properly load only once before the tests.
+ QA::Runtime::Logger.info("Performing sanity check for environment!")
QA::Support::Retrier.retry_on_exception do
QA::Runtime::Browser.visit(:gitlab, QA::Page::Main::Login)
end
diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb
index 89e84f414b1..03178661826 100644
--- a/qa/qa/runtime/browser.rb
+++ b/qa/qa/runtime/browser.rb
@@ -18,10 +18,6 @@ module QA
CAPYBARA_MAX_WAIT_TIME = 10
- def initialize
- self.class.configure!
- end
-
def self.blank_page?
['', 'about:blank', 'data:,'].include?(Capybara.current_session.driver.browser.current_url)
rescue StandardError
@@ -49,6 +45,8 @@ module QA
# rubocop: disable Metrics/AbcSize
def self.configure!
+ return if @configured
+
RSpec.configure do |config|
config.define_derived_metadata(file_path: %r{/qa/specs/features/}) do |metadata|
metadata[:type] = :feature
@@ -57,23 +55,19 @@ module QA
config.append_after(:each) do |example|
if example.metadata[:screenshot]
screenshot = example.metadata[:screenshot][:image] || example.metadata[:screenshot][:html]
- example.metadata[:stdout] = %{[[ATTACHMENT|#{screenshot}]]}
+ example.metadata[:stdout] = %([[ATTACHMENT|#{screenshot}]])
end
end
end
Capybara.server_port = 9887 + ENV['TEST_ENV_NUMBER'].to_i
- return if Capybara.drivers.include?(:chrome)
-
Capybara.register_driver QA::Runtime::Env.browser do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.send(QA::Runtime::Env.browser)
case QA::Runtime::Env.browser
when :chrome
- if QA::Runtime::Env.accept_insecure_certs?
- capabilities['acceptInsecureCerts'] = true
- end
+ capabilities['acceptInsecureCerts'] = true if QA::Runtime::Env.accept_insecure_certs?
# set logging preferences
# this enables access to logs with `page.driver.manage.get_log(:browser)`
@@ -103,7 +97,9 @@ module QA
# Specify the user-agent to allow challenges to be bypassed
# See https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/11938
- capabilities['goog:chromeOptions'][:args] << "user-agent=#{QA::Runtime::Env.user_agent}" if QA::Runtime::Env.user_agent
+ if QA::Runtime::Env.user_agent
+ capabilities['goog:chromeOptions'][:args] << "user-agent=#{QA::Runtime::Env.user_agent}"
+ end
if QA::Runtime::Env.remote_mobile_device_name
capabilities['platformName'] = 'Android'
@@ -121,9 +117,7 @@ module QA
end
when :firefox
- if QA::Runtime::Env.accept_insecure_certs?
- capabilities['acceptInsecureCerts'] = true
- end
+ capabilities['acceptInsecureCerts'] = true if QA::Runtime::Env.accept_insecure_certs?
end
# Use the same profile on QA runs if CHROME_REUSE_PROFILE is true.
@@ -162,7 +156,10 @@ module QA
Capybara::Screenshot.append_timestamp = false
Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
- ::File.join(QA::Runtime::Namespace.name(reset_cache: false), example.full_description.downcase.parameterize(separator: "_")[0..99])
+ ::File.join(
+ QA::Runtime::Namespace.name(reset_cache: false),
+ example.full_description.downcase.parameterize(separator: "_")[0..99]
+ )
end
Capybara.configure do |config|
@@ -183,6 +180,8 @@ module QA
config.base_url = Runtime::Scenario.attributes[:gitlab_address] # reuse GitLab address
config.hide_banner = true
end
+
+ @configured = true
end
# rubocop: enable Metrics/AbcSize
@@ -221,7 +220,7 @@ module QA
end
end
- yield.tap { clear! } if block_given?
+ yield.tap { clear! } if block
end
# To redirect the browser to a canary or non-canary web node
diff --git a/qa/qa/scenario/template.rb b/qa/qa/scenario/template.rb
index ad42202466d..829bdbbc6ee 100644
--- a/qa/qa/scenario/template.rb
+++ b/qa/qa/scenario/template.rb
@@ -26,15 +26,23 @@ module QA
# Save the scenario class name
Runtime::Scenario.define(:klass, self.class.name)
+ # Set large setup attribute
+ Runtime::Scenario.define(:large_setup?, args.include?('can_use_large_setup'))
+
##
# Setup knapsack and download latest report
#
Support::KnapsackReport.configure!
+ ##
+ # Configure browser
+ #
+ Runtime::Browser.configure!
+
##
# Perform before hooks, which are different for CE and EE
#
- Runtime::Release.perform_before_hooks unless Runtime::Env.dry_run
+ QA::Runtime::Release.perform_before_hooks unless QA::Runtime::Env.dry_run
Runtime::Feature.enable(options[:enable_feature]) if options.key?(:enable_feature)
diff --git a/qa/qa/specs/features/api/1_manage/project_access_token_spec.rb b/qa/qa/specs/features/api/1_manage/project_access_token_spec.rb
index 6480b880400..33ec24d1be1 100644
--- a/qa/qa/specs/features/api/1_manage/project_access_token_spec.rb
+++ b/qa/qa/specs/features/api/1_manage/project_access_token_spec.rb
@@ -11,7 +11,7 @@ module QA
@user_api_client = Runtime::API::Client.new(:gitlab, personal_access_token: @project_access_token.token)
end
- context 'for the same project' do
+ context 'for the same project', :reliable do
it 'can be used to create a file via the project API', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347858' do
expect do
Resource::File.fabricate_via_api! do |file|
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/project_access_token_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/project_access_token_spec.rb
index c2bd61155b1..381a25a14d0 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/project_access_token_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/project_access_token_spec.rb
@@ -2,8 +2,8 @@
module QA
RSpec.describe 'Manage' do
- describe 'Project access tokens' do
- let(:project_access_token) {QA::Resource::ProjectAccessToken.fabricate_via_browser_ui!}
+ describe 'Project access tokens', :reliable do
+ let(:project_access_token) { QA::Resource::ProjectAccessToken.fabricate_via_browser_ui! }
it 'can be created and revoked via the UI', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347688' do
expect(project_access_token.token).not_to be_nil
diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/ui_variable_inheritable_when_forward_pipeline_variables_true_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/ui_variable_inheritable_when_forward_pipeline_variables_true_spec.rb
index 496cc5f8a60..bd200e57ff9 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/ui_variable_inheritable_when_forward_pipeline_variables_true_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/ui_variable_inheritable_when_forward_pipeline_variables_true_spec.rb
@@ -24,7 +24,8 @@ module QA
it(
'is inheritable when forward:pipeline_variables is true',
:aggregate_failures,
- testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/358197'
+ testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/358197',
+ quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/361338', type: :investigating }
) do
visit_job_page('child1', 'child1_job')
verify_job_log_shows_variable_value
diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/ui_variable_non_inheritable_when_forward_pipeline_variables_false_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/ui_variable_non_inheritable_when_forward_pipeline_variables_false_spec.rb
index 2a0aaf6d7a3..2bd0be542fe 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/ui_variable_non_inheritable_when_forward_pipeline_variables_false_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/ui_variable_non_inheritable_when_forward_pipeline_variables_false_spec.rb
@@ -25,7 +25,8 @@ module QA
it(
'is not inheritable when forward:pipeline_variables is false',
:aggregate_failures,
- testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/358199'
+ testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/358199',
+ quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/361339', type: :investigating }
) do
visit_job_page('child1', 'child1_job')
verify_job_log_does_not_show_variable_value
@@ -39,7 +40,8 @@ module QA
it(
'is not inheritable by default',
:aggregate_failures,
- testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/358200'
+ testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/358200',
+ quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/361339', type: :investigating }
) do
visit_job_page('child2', 'child2_job')
verify_job_log_does_not_show_variable_value
diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb
index 205b4d1168a..d03ebd5aba3 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb
@@ -31,7 +31,7 @@ module QA
project.remove_via_api!
end
- it 'creates 2 trigger jobs and passes corresponding matrix variables', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/348000' do
+ it 'creates 2 trigger jobs and passes corresponding matrix variables', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/348000', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/361346', type: :investigating } do
Page::Project::Pipeline::Show.perform do |parent_pipeline|
trigger_title1 = 'deploy: [ovh, monitoring]'
trigger_title2 = 'deploy: [ovh, app]'
diff --git a/qa/qa/specs/knapsack_runner.rb b/qa/qa/specs/knapsack_runner.rb
new file mode 100644
index 00000000000..123ecc5e1c3
--- /dev/null
+++ b/qa/qa/specs/knapsack_runner.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module QA
+ module Specs
+ class KnapsackRunner
+ def self.run(args)
+ allocator = Knapsack::AllocatorBuilder.new(Knapsack::Adapters::RSpecAdapter).allocator
+
+ Knapsack.logger.info 'Report specs:'
+ Knapsack.logger.info allocator.report_node_tests
+ Knapsack.logger.info 'Leftover specs:'
+ Knapsack.logger.info allocator.leftover_node_tests
+
+ status = RSpec::Core::Runner.run([*args, '--', *allocator.node_tests])
+ yield status if block_given?
+ status
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/runner.rb b/qa/qa/specs/runner.rb
index c30e5d822c4..68b624b3f2e 100644
--- a/qa/qa/specs/runner.rb
+++ b/qa/qa/specs/runner.rb
@@ -19,18 +19,6 @@ module QA
@options = []
end
- def paths_from_knapsack
- allocator = Knapsack::AllocatorBuilder.new(Knapsack::Adapters::RSpecAdapter).allocator
-
- QA::Runtime::Logger.info '==== Knapsack specs to execute ====='
- QA::Runtime::Logger.info 'Report specs:'
- QA::Runtime::Logger.info allocator.report_node_tests.join(', ')
- QA::Runtime::Logger.info 'Leftover specs:'
- QA::Runtime::Logger.info allocator.leftover_node_tests.join(', ')
-
- ['--', allocator.node_tests]
- end
-
def rspec_tags
tags_for_rspec = []
@@ -52,77 +40,79 @@ module QA
tags_for_rspec
end
- # rubocop:disable Metrics/AbcSize
- # rubocop:disable Metrics/CyclomaticComplexity
def perform
args = []
args.push('--tty') if tty
args.push(rspec_tags)
args.push(options)
- if Runtime::Env.knapsack?
- args.push(paths_from_knapsack)
- else
- args.push(DEFAULT_TEST_PATH_ARGS) unless options.any? { |opt| opt =~ %r{/features/} }
+ unless Runtime::Env.knapsack? || options.any? { |opt| opt.include?('features') }
+ args.push(DEFAULT_TEST_PATH_ARGS)
end
- Runtime::Scenario.define(:large_setup?, args.flatten.include?('can_use_large_setup'))
-
- if Runtime::Scenario.attributes[:parallel]
+ if Runtime::Env.knapsack?
+ KnapsackRunner.run(args.flatten) { |status| abort if status.nonzero? }
+ elsif Runtime::Scenario.attributes[:parallel]
ParallelRunner.run(args.flatten)
elsif Runtime::Scenario.attributes[:loop]
LoopRunner.run(args.flatten)
elsif Runtime::Scenario.attributes[:count_examples_only]
- args.unshift('--dry-run')
- out = StringIO.new
-
- RSpec::Core::Runner.run(args.flatten, $stderr, out).tap do |status|
- abort if status.nonzero?
- end
-
- begin
- total_examples = out.string.match(/(\d+) examples?,/)[1]
- rescue StandardError
- raise RegexMismatchError, 'Rspec output did not match regex'
- end
-
- filename = build_filename
-
- File.open(filename, 'w') { |f| f.write(total_examples) } if total_examples.to_i > 0
-
- $stdout.puts "Total examples in #{Runtime::Scenario.klass}: #{total_examples}#{total_examples.to_i > 0 ? ". Saved to file: #{filename}" : ''}"
+ count_examples_only(args)
elsif Runtime::Scenario.attributes[:test_metadata_only]
- args.unshift('--dry-run')
-
- output_file = Pathname.new(File.join(Runtime::Path.qa_root, 'tmp', 'test-metadata.json'))
-
- RSpec.configure do |config|
- config.add_formatter(QA::Support::JsonFormatter, output_file)
- config.fail_if_no_examples = true
- end
-
- RSpec::Core::Runner.run(args.flatten, $stderr, $stdout) do |status|
- abort if status.nonzero?
- end
-
- $stdout.puts "Saved to file: #{output_file}"
+ test_metadata_only(args)
else
- RSpec::Core::Runner.run(args.flatten, *DEFAULT_STD_ARGS).tap do |status|
- abort if status.nonzero?
- end
+ RSpec::Core::Runner.run(args.flatten, *DEFAULT_STD_ARGS).tap { |status| abort if status.nonzero? }
end
end
- # rubocop:enable Metrics/AbcSize
- # rubocop:enable Metrics/CyclomaticComplexity
private
+ def count_examples_only(args)
+ args.unshift('--dry-run')
+ out = StringIO.new
+
+ RSpec::Core::Runner.run(args.flatten, $stderr, out).tap do |status|
+ abort if status.nonzero?
+ end
+
+ begin
+ total_examples = out.string.match(/(\d+) examples?,/)[1]
+ rescue StandardError
+ raise RegexMismatchError, 'Rspec output did not match regex'
+ end
+
+ filename = build_filename
+
+ File.open(filename, 'w') { |f| f.write(total_examples) } if total_examples.to_i > 0
+
+ saved_file_msg = total_examples.to_i > 0 ? ". Saved to file: #{filename}" : ''
+ $stdout.puts "Total examples in #{Runtime::Scenario.klass}: #{total_examples}#{saved_file_msg}"
+ end
+
+ def test_metadata_only(args)
+ args.unshift('--dry-run')
+
+ output_file = Pathname.new(File.join(Runtime::Path.qa_root, 'tmp', 'test-metadata.json'))
+
+ RSpec.configure do |config|
+ config.add_formatter(QA::Support::JsonFormatter, output_file)
+ config.fail_if_no_examples = true
+ end
+
+ RSpec::Core::Runner.run(args.flatten, $stderr, $stdout) do |status|
+ abort if status.nonzero?
+ end
+
+ $stdout.puts "Saved to file: #{output_file}"
+ end
+
def build_filename
filename = Runtime::Scenario.klass.split('::').last(3).join('_').downcase
tags = []
+ tag_opts = %w[--tag -t]
options.reduce do |before, after|
- tags << after if %w[--tag -t].include?(before)
+ tags << after if tag_opts.include?(before)
after
end
tags = tags.compact.join('_')
diff --git a/qa/spec/scenario/template_spec.rb b/qa/spec/scenario/template_spec.rb
index 51cdab5de22..56521cc13bc 100644
--- a/qa/spec/scenario/template_spec.rb
+++ b/qa/spec/scenario/template_spec.rb
@@ -18,6 +18,8 @@ RSpec.describe QA::Scenario::Template do
allow(QA::Runtime::Env).to receive(:knapsack?).and_return(false)
allow(QA::Runtime::Env).to receive(:gitlab_url).and_return(gitlab_address_from_env)
+ allow(QA::Runtime::Browser).to receive(:configure!)
+
allow(scenario).to receive(:attributes).and_return({ gitlab_address: gitlab_address })
allow(scenario).to receive(:define)
diff --git a/qa/spec/scenario_shared_examples.rb b/qa/spec/scenario_shared_examples.rb
index 55aae731cd9..944e309c4cb 100644
--- a/qa/spec/scenario_shared_examples.rb
+++ b/qa/spec/scenario_shared_examples.rb
@@ -18,6 +18,8 @@ module QA
stub_const('QA::Runtime::Scenario', scenario)
stub_const('QA::Runtime::Feature', feature)
+ allow(QA::Runtime::Browser).to receive(:configure!)
+
allow(scenario).to receive(:attributes).and_return(args)
allow(runner).to receive(:perform).and_yield(runner)
end
diff --git a/qa/tasks/knapsack.rake b/qa/tasks/knapsack.rake
index f50716e03bc..03c295f1aff 100644
--- a/qa/tasks/knapsack.rake
+++ b/qa/tasks/knapsack.rake
@@ -3,15 +3,17 @@
namespace :knapsack do
desc "Run tests with knapsack runner"
task :rspec, [:rspec_args] do |_, args|
+ rspec_args = args[:rspec_args]&.split(' ') || []
+
unless QA::Runtime::Env.knapsack?
QA::Runtime::Logger.info("This environment is not compatible with parallel knapsack execution!")
QA::Runtime::Logger.info("Falling back to standard execution")
- exec(%Q[bundle exec rspec #{args[:rspec_args]}])
+ exit RSpec::Core::Runner.run([*rspec_args, "qa/specs/features"])
end
QA::Support::KnapsackReport.configure!
- Knapsack::Runners::RSpecRunner.run(args[:rspec_args])
+ exit QA::Specs::KnapsackRunner.run(rspec_args)
end
desc "Download latest knapsack report"
diff --git a/spec/controllers/admin/clusters_controller_spec.rb b/spec/controllers/admin/clusters_controller_spec.rb
index fed9d2e8588..ca2b50b529c 100644
--- a/spec/controllers/admin/clusters_controller_spec.rb
+++ b/spec/controllers/admin/clusters_controller_spec.rb
@@ -102,87 +102,6 @@ RSpec.describe Admin::ClustersController do
end
end
- describe 'GET #new' do
- let(:user) { admin }
-
- def go(provider: 'gcp')
- get :new, params: { provider: provider }
- end
-
- include_examples ':certificate_based_clusters feature flag controller responses' do
- let(:subject) { go }
- end
-
- describe 'functionality for new cluster' do
- context 'when omniauth has been configured' do
- let(:key) { 'secret-key' }
- let(:session_key_for_redirect_uri) do
- GoogleApi::CloudPlatform::Client.session_key_for_redirect_uri(key)
- end
-
- context 'when selected provider is gke and no valid gcp token exists' do
- it 'redirects to gcp authorize_url' do
- go
-
- expect(response).to redirect_to(assigns(:authorize_url))
- end
- end
- end
-
- context 'when omniauth has not configured' do
- before do
- stub_omniauth_setting(providers: [])
- end
-
- it 'does not have authorize_url' do
- go
-
- expect(assigns(:authorize_url)).to be_nil
- end
- end
-
- context 'when access token is valid' do
- before do
- stub_google_api_validate_token
- end
-
- it 'has new object' do
- go
-
- expect(assigns(:gcp_cluster)).to be_an_instance_of(Clusters::ClusterPresenter)
- end
- end
-
- context 'when access token is expired' do
- before do
- stub_google_api_expired_token
- end
-
- it { expect(@valid_gcp_token).to be_falsey }
- end
-
- context 'when access token is not stored in session' do
- it { expect(@valid_gcp_token).to be_falsey }
- end
- end
-
- describe 'functionality for existing cluster' do
- it 'has new object' do
- go
-
- expect(assigns(:user_cluster)).to be_an_instance_of(Clusters::ClusterPresenter)
- end
- end
-
- include_examples 'GET new cluster shared examples'
-
- describe 'security' do
- it { expect { go }.to be_allowed_for(:admin) }
- it { expect { go }.to be_denied_for(:user) }
- it { expect { go }.to be_denied_for(:external) }
- end
- end
-
it_behaves_like 'GET #metrics_dashboard for dashboard', 'Cluster health' do
let(:cluster) { create(:cluster, :instance, :provided_by_gcp) }
@@ -216,164 +135,6 @@ RSpec.describe Admin::ClustersController do
end
end
- describe 'POST #create_gcp' do
- let(:legacy_abac_param) { 'true' }
- let(:params) do
- {
- cluster: {
- name: 'new-cluster',
- provider_gcp_attributes: {
- gcp_project_id: 'gcp-project-12345',
- legacy_abac: legacy_abac_param
- }
- }
- }
- end
-
- def post_create_gcp
- post :create_gcp, params: params
- end
-
- include_examples ':certificate_based_clusters feature flag controller responses' do
- let(:subject) { post_create_gcp }
- end
-
- describe 'functionality' do
- context 'when access token is valid' do
- before do
- stub_google_api_validate_token
- end
-
- it 'creates a new cluster' do
- expect(ClusterProvisionWorker).to receive(:perform_async)
- expect { post_create_gcp }.to change { Clusters::Cluster.count }
- .and change { Clusters::Providers::Gcp.count }
-
- cluster = Clusters::Cluster.instance_type.first
-
- expect(response).to redirect_to(admin_cluster_path(cluster))
- expect(cluster).to be_gcp
- expect(cluster).to be_kubernetes
- expect(cluster.provider_gcp).to be_legacy_abac
- end
-
- context 'when legacy_abac param is false' do
- let(:legacy_abac_param) { 'false' }
-
- it 'creates a new cluster with legacy_abac_disabled' do
- expect(ClusterProvisionWorker).to receive(:perform_async)
- expect { post_create_gcp }.to change { Clusters::Cluster.count }
- .and change { Clusters::Providers::Gcp.count }
- expect(Clusters::Cluster.instance_type.first.provider_gcp).not_to be_legacy_abac
- end
- end
- end
-
- context 'when access token is expired' do
- before do
- stub_google_api_expired_token
- end
-
- it { expect(@valid_gcp_token).to be_falsey }
- end
-
- context 'when access token is not stored in session' do
- it { expect(@valid_gcp_token).to be_falsey }
- end
- end
-
- describe 'security' do
- before do
- allow_next_instance_of(described_class) do |instance|
- allow(instance).to receive(:token_in_session).and_return('token')
- allow(instance).to receive(:expires_at_in_session).and_return(1.hour.since.to_i.to_s)
- end
- allow_next_instance_of(GoogleApi::CloudPlatform::Client) do |instance|
- allow(instance).to receive(:projects_zones_clusters_create) do
- double(
- 'instance',
- self_link: 'projects/gcp-project-12345/zones/us-central1-a/operations/ope-123',
- status: 'RUNNING'
- )
- end
- end
-
- allow(WaitForClusterCreationWorker).to receive(:perform_in).and_return(nil)
- end
-
- it { expect { post_create_gcp }.to be_allowed_for(:admin) }
- it { expect { post_create_gcp }.to be_denied_for(:user) }
- it { expect { post_create_gcp }.to be_denied_for(:external) }
- end
- end
-
- describe 'POST #create_aws' do
- let(:params) do
- {
- cluster: {
- name: 'new-cluster',
- provider_aws_attributes: {
- key_name: 'key',
- role_arn: 'arn:role',
- region: 'region',
- vpc_id: 'vpc',
- instance_type: 'instance type',
- num_nodes: 3,
- security_group_id: 'security group',
- subnet_ids: %w(subnet1 subnet2)
- }
- }
- }
- end
-
- def post_create_aws
- post :create_aws, params: params
- end
-
- include_examples ':certificate_based_clusters feature flag controller responses' do
- let(:subject) { post_create_aws }
- end
-
- it 'creates a new cluster' do
- expect(ClusterProvisionWorker).to receive(:perform_async)
- expect { post_create_aws }.to change { Clusters::Cluster.count }
- .and change { Clusters::Providers::Aws.count }
-
- cluster = Clusters::Cluster.instance_type.first
-
- expect(response).to have_gitlab_http_status(:created)
- expect(response.location).to eq(admin_cluster_path(cluster))
- expect(cluster).to be_aws
- expect(cluster).to be_kubernetes
- end
-
- context 'params are invalid' do
- let(:params) do
- {
- cluster: { name: '' }
- }
- end
-
- it 'does not create a cluster' do
- expect { post_create_aws }.not_to change { Clusters::Cluster.count }
-
- expect(response).to have_gitlab_http_status(:unprocessable_entity)
- expect(response.media_type).to eq('application/json')
- expect(response.body).to include('is invalid')
- end
- end
-
- describe 'security' do
- before do
- allow(WaitForClusterCreationWorker).to receive(:perform_in)
- end
-
- it { expect { post_create_aws }.to be_allowed_for(:admin) }
- it { expect { post_create_aws }.to be_denied_for(:user) }
- it { expect { post_create_aws }.to be_denied_for(:external) }
- end
- end
-
describe 'POST #create_user' do
let(:params) do
{
diff --git a/spec/controllers/groups/clusters_controller_spec.rb b/spec/controllers/groups/clusters_controller_spec.rb
index 4eeae64b760..4b82c5ceb1c 100644
--- a/spec/controllers/groups/clusters_controller_spec.rb
+++ b/spec/controllers/groups/clusters_controller_spec.rb
@@ -115,95 +115,6 @@ RSpec.describe Groups::ClustersController do
end
end
- describe 'GET new' do
- def go(provider: 'gcp')
- get :new, params: { group_id: group, provider: provider }
- end
-
- include_examples ':certificate_based_clusters feature flag controller responses' do
- let(:subject) { go }
- end
-
- describe 'functionality for new cluster' do
- context 'when omniauth has been configured' do
- let(:key) { 'secret-key' }
- let(:session_key_for_redirect_uri) do
- GoogleApi::CloudPlatform::Client.session_key_for_redirect_uri(key)
- end
-
- before do
- allow(SecureRandom).to receive(:hex).and_return(key)
- end
-
- it 'redirects to gcp authorize_url' do
- go
-
- expect(assigns(:authorize_url)).to include(key)
- expect(session[session_key_for_redirect_uri]).to eq(new_group_cluster_path(group, provider: :gcp))
- expect(response).to redirect_to(assigns(:authorize_url))
- end
- end
-
- context 'when omniauth has not configured' do
- before do
- stub_omniauth_setting(providers: [])
- end
-
- it 'does not have authorize_url' do
- go
-
- expect(assigns(:authorize_url)).to be_nil
- end
- end
-
- context 'when access token is valid' do
- before do
- stub_google_api_validate_token
- end
-
- it 'has new object' do
- go
-
- expect(assigns(:gcp_cluster)).to be_an_instance_of(Clusters::ClusterPresenter)
- end
- end
-
- context 'when access token is expired' do
- before do
- stub_google_api_expired_token
- end
-
- it { expect(@valid_gcp_token).to be_falsey }
- end
-
- context 'when access token is not stored in session' do
- it { expect(@valid_gcp_token).to be_falsey }
- end
- end
-
- describe 'functionality for existing cluster' do
- it 'has new object' do
- go
-
- expect(assigns(:user_cluster)).to be_an_instance_of(Clusters::ClusterPresenter)
- end
- end
-
- include_examples 'GET new cluster shared examples'
-
- describe 'security' do
- it('is allowed for admin when admin mode is enabled', :enable_admin_mode) { expect { go }.to be_allowed_for(:admin) }
- it('is denied for admin when admin mode is disabled') { expect { go }.to be_denied_for(:admin) }
- it { expect { go }.to be_allowed_for(:owner).of(group) }
- it { expect { go }.to be_allowed_for(:maintainer).of(group) }
- it { expect { go }.to be_denied_for(:developer).of(group) }
- it { expect { go }.to be_denied_for(:reporter).of(group) }
- it { expect { go }.to be_denied_for(:guest).of(group) }
- it { expect { go }.to be_denied_for(:user) }
- it { expect { go }.to be_denied_for(:external) }
- end
- end
-
it_behaves_like 'GET #metrics_dashboard for dashboard', 'Cluster health' do
let(:cluster) { create(:cluster, :provided_by_gcp, cluster_type: :group_type, groups: [group]) }
@@ -244,105 +155,6 @@ RSpec.describe Groups::ClustersController do
end
end
- describe 'POST create for new cluster' do
- let(:legacy_abac_param) { 'true' }
- let(:params) do
- {
- cluster: {
- name: 'new-cluster',
- managed: '1',
- provider_gcp_attributes: {
- gcp_project_id: 'gcp-project-12345',
- legacy_abac: legacy_abac_param
- }
- }
- }
- end
-
- def go
- post :create_gcp, params: params.merge(group_id: group)
- end
-
- include_examples ':certificate_based_clusters feature flag controller responses' do
- let(:subject) { go }
- end
-
- describe 'functionality' do
- context 'when access token is valid' do
- before do
- stub_google_api_validate_token
- end
-
- it 'creates a new cluster' do
- expect(ClusterProvisionWorker).to receive(:perform_async)
- expect { go }.to change { Clusters::Cluster.count }
- .and change { Clusters::Providers::Gcp.count }
-
- cluster = group.clusters.first
-
- expect(response).to redirect_to(group_cluster_path(group, cluster))
- expect(cluster).to be_gcp
- expect(cluster).to be_kubernetes
- expect(cluster.provider_gcp).to be_legacy_abac
- expect(cluster).to be_managed
- expect(cluster).to be_namespace_per_environment
- end
-
- context 'when legacy_abac param is false' do
- let(:legacy_abac_param) { 'false' }
-
- it 'creates a new cluster with legacy_abac_disabled' do
- expect(ClusterProvisionWorker).to receive(:perform_async)
- expect { go }.to change { Clusters::Cluster.count }
- .and change { Clusters::Providers::Gcp.count }
- expect(group.clusters.first.provider_gcp).not_to be_legacy_abac
- end
- end
- end
-
- context 'when access token is expired' do
- before do
- stub_google_api_expired_token
- end
-
- it { expect(@valid_gcp_token).to be_falsey }
- end
-
- context 'when access token is not stored in session' do
- it { expect(@valid_gcp_token).to be_falsey }
- end
- end
-
- describe 'security' do
- before do
- allow_any_instance_of(described_class)
- .to receive(:token_in_session).and_return('token')
- allow_any_instance_of(described_class)
- .to receive(:expires_at_in_session).and_return(1.hour.since.to_i.to_s)
- allow_any_instance_of(GoogleApi::CloudPlatform::Client)
- .to receive(:projects_zones_clusters_create) do
- double(
- 'instance',
- self_link: 'projects/gcp-project-12345/zones/us-central1-a/operations/ope-123',
- status: 'RUNNING'
- )
- end
-
- allow(WaitForClusterCreationWorker).to receive(:perform_in).and_return(nil)
- end
-
- it('is allowed for admin when admin mode is enabled', :enable_admin_mode) { expect { go }.to be_allowed_for(:admin) }
- it('is denied for admin when admin mode is disabled') { expect { go }.to be_denied_for(:admin) }
- it { expect { go }.to be_allowed_for(:owner).of(group) }
- it { expect { go }.to be_allowed_for(:maintainer).of(group) }
- it { expect { go }.to be_denied_for(:developer).of(group) }
- it { expect { go }.to be_denied_for(:reporter).of(group) }
- it { expect { go }.to be_denied_for(:guest).of(group) }
- it { expect { go }.to be_denied_for(:user) }
- it { expect { go }.to be_denied_for(:external) }
- end
- end
-
describe 'POST create for existing cluster' do
let(:params) do
{
diff --git a/spec/controllers/projects/clusters_controller_spec.rb b/spec/controllers/projects/clusters_controller_spec.rb
index 44bdc958805..01420e30d24 100644
--- a/spec/controllers/projects/clusters_controller_spec.rb
+++ b/spec/controllers/projects/clusters_controller_spec.rb
@@ -113,103 +113,6 @@ RSpec.describe Projects::ClustersController do
end
end
- describe 'GET new' do
- def go(provider: 'gcp')
- get :new, params: {
- namespace_id: project.namespace,
- project_id: project,
- provider: provider
- }
- end
-
- include_examples ':certificate_based_clusters feature flag controller responses' do
- let(:subject) { go }
- end
-
- describe 'functionality for new cluster' do
- context 'when omniauth has been configured' do
- let(:key) { 'secret-key' }
- let(:session_key_for_redirect_uri) do
- GoogleApi::CloudPlatform::Client.session_key_for_redirect_uri(key)
- end
-
- before do
- allow(SecureRandom).to receive(:hex).and_return(key)
- end
-
- it 'redirects to gcp authorize_url' do
- go
-
- expect(assigns(:authorize_url)).to include(key)
- expect(session[session_key_for_redirect_uri]).to eq(new_project_cluster_path(project, provider: :gcp))
- expect(response).to redirect_to(assigns(:authorize_url))
- end
- end
-
- context 'when omniauth has not configured' do
- before do
- stub_omniauth_setting(providers: [])
- end
-
- it 'does not have authorize_url' do
- go
-
- expect(assigns(:authorize_url)).to be_nil
- end
- end
-
- context 'when access token is valid' do
- before do
- stub_google_api_validate_token
- end
-
- it 'has new object' do
- go
-
- expect(assigns(:gcp_cluster)).to be_an_instance_of(Clusters::ClusterPresenter)
- end
- end
-
- context 'when access token is expired' do
- before do
- stub_google_api_expired_token
- end
-
- it { expect(@valid_gcp_token).to be_falsey }
- end
-
- context 'when access token is not stored in session' do
- it { expect(@valid_gcp_token).to be_falsey }
- end
- end
-
- describe 'functionality for existing cluster' do
- it 'has new object' do
- go
-
- expect(assigns(:user_cluster)).to be_an_instance_of(Clusters::ClusterPresenter)
- end
- end
-
- include_examples 'GET new cluster shared examples'
-
- describe 'security' do
- it 'is allowed for admin when admin mode enabled', :enable_admin_mode do
- expect { go }.to be_allowed_for(:admin)
- end
- it 'is disabled for admin when admin mode disabled' do
- expect { go }.to be_denied_for(:admin)
- end
- it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:maintainer).of(project) }
- it { expect { go }.to be_denied_for(:developer).of(project) }
- it { expect { go }.to be_denied_for(:reporter).of(project) }
- it { expect { go }.to be_denied_for(:guest).of(project) }
- it { expect { go }.to be_denied_for(:user) }
- it { expect { go }.to be_denied_for(:external) }
- end
- end
-
describe 'GET #prometheus_proxy' do
let(:proxyable) do
create(:cluster, :provided_by_gcp, projects: [project])
@@ -252,107 +155,6 @@ RSpec.describe Projects::ClustersController do
end
end
- describe 'POST create for new cluster' do
- let(:legacy_abac_param) { 'true' }
- let(:params) do
- {
- cluster: {
- name: 'new-cluster',
- managed: '1',
- namespace_per_environment: '0',
- provider_gcp_attributes: {
- gcp_project_id: 'gcp-project-12345',
- legacy_abac: legacy_abac_param
- }
- }
- }
- end
-
- def go
- post :create_gcp, params: params.merge(namespace_id: project.namespace, project_id: project)
- end
-
- include_examples ':certificate_based_clusters feature flag controller responses' do
- let(:subject) { go }
- end
-
- describe 'functionality' do
- context 'when access token is valid' do
- before do
- stub_google_api_validate_token
- end
-
- it 'creates a new cluster' do
- expect(ClusterProvisionWorker).to receive(:perform_async)
- expect { go }.to change { Clusters::Cluster.count }
- .and change { Clusters::Providers::Gcp.count }
- expect(response).to redirect_to(project_cluster_path(project, project.clusters.first))
- expect(project.clusters.first).to be_gcp
- expect(project.clusters.first).to be_kubernetes
- expect(project.clusters.first.provider_gcp).to be_legacy_abac
- expect(project.clusters.first.managed?).to be_truthy
- expect(project.clusters.first.namespace_per_environment?).to be_falsy
- end
-
- context 'when legacy_abac param is false' do
- let(:legacy_abac_param) { 'false' }
-
- it 'creates a new cluster with legacy_abac_disabled' do
- expect(ClusterProvisionWorker).to receive(:perform_async)
- expect { go }.to change { Clusters::Cluster.count }
- .and change { Clusters::Providers::Gcp.count }
- expect(project.clusters.first.provider_gcp).not_to be_legacy_abac
- end
- end
- end
-
- context 'when access token is expired' do
- before do
- stub_google_api_expired_token
- end
-
- it { expect(@valid_gcp_token).to be_falsey }
- end
-
- context 'when access token is not stored in session' do
- it { expect(@valid_gcp_token).to be_falsey }
- end
- end
-
- describe 'security' do
- before do
- allow_any_instance_of(described_class)
- .to receive(:token_in_session).and_return('token')
- allow_any_instance_of(described_class)
- .to receive(:expires_at_in_session).and_return(1.hour.since.to_i.to_s)
- allow_any_instance_of(GoogleApi::CloudPlatform::Client)
- .to receive(:projects_zones_clusters_create) do
- double(
- 'secure',
- self_link: 'projects/gcp-project-12345/zones/us-central1-a/operations/ope-123',
- status: 'RUNNING'
- )
- end
-
- allow(WaitForClusterCreationWorker).to receive(:perform_in).and_return(nil)
- end
-
- it 'is allowed for admin when admin mode enabled', :enable_admin_mode do
- expect { go }.to be_allowed_for(:admin)
- end
- it 'is disabled for admin when admin mode disabled' do
- expect { go }.to be_denied_for(:admin)
- end
- it { expect { go }.to be_allowed_for(:owner).of(project) }
- it { expect { go }.to be_allowed_for(:maintainer).of(project) }
- it { expect { go }.to be_denied_for(:developer).of(project) }
- it { expect { go }.to be_denied_for(:reporter).of(project) }
- it { expect { go }.to be_denied_for(:guest).of(project) }
- it { expect { go }.to be_denied_for(:user) }
- it { expect { go }.to be_denied_for(:external) }
- end
- end
-
describe 'POST create for existing cluster' do
let(:params) do
{
diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb
index 67c5968545c..88598dbf72f 100644
--- a/spec/features/admin/admin_runners_spec.rb
+++ b/spec/features/admin/admin_runners_spec.rb
@@ -530,6 +530,21 @@ RSpec.describe "Admin Runners" do
end
end
+ describe 'when a runner is updated', :js do
+ before do
+ click_on _('Save changes')
+ wait_for_requests
+ end
+
+ it 'show success alert' do
+ expect(page.find('[data-testid="alert-success"]')).to have_content('saved')
+ end
+
+ it 'redirects to runner page' do
+ expect(current_url).to match(admin_runner_path(runner))
+ end
+ end
+
describe 'projects' do
it 'contains project names' do
expect(page).to have_content(@project1.full_name)
diff --git a/spec/features/admin/clusters/eks_spec.rb b/spec/features/admin/clusters/eks_spec.rb
deleted file mode 100644
index 4667f9c20a1..00000000000
--- a/spec/features/admin/clusters/eks_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'Instance-level AWS EKS Cluster', :js do
- let(:user) { create(:admin) }
-
- before do
- sign_in(user)
- gitlab_enable_admin_mode_sign_in(user)
- stub_application_setting(eks_integration_enabled: true)
- end
-
- context 'when user does not have a cluster and visits group clusters page' do
- before do
- visit admin_clusters_path
-
- click_button(class: 'dropdown-toggle-split')
- click_link 'Create a cluster (deprecated)'
- end
-
- context 'when user creates a cluster on AWS EKS' do
- before do
- click_link 'Amazon EKS'
- end
-
- it 'user sees a form to create an EKS cluster' do
- expect(page).to have_content('Authenticate with Amazon Web Services')
- end
- end
- end
-end
diff --git a/spec/features/groups/clusters/eks_spec.rb b/spec/features/groups/clusters/eks_spec.rb
deleted file mode 100644
index 0e64a2faf3e..00000000000
--- a/spec/features/groups/clusters/eks_spec.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'Group AWS EKS Cluster', :js do
- let(:group) { create(:group) }
- let(:user) { create(:user) }
-
- before do
- group.add_maintainer(user)
- gitlab_sign_in(user)
-
- allow(Groups::ClustersController).to receive(:STATUS_POLLING_INTERVAL) { 100 }
- allow_any_instance_of(Clusters::Kubernetes::CreateOrUpdateNamespaceService).to receive(:execute)
- allow_any_instance_of(Clusters::Cluster).to receive(:retrieve_connection_status).and_return(:connected)
- stub_application_setting(eks_integration_enabled: true)
- end
-
- context 'when user does not have a cluster and visits group clusters page' do
- before do
- visit group_clusters_path(group)
-
- click_button(class: 'dropdown-toggle-split')
- click_link 'Create a cluster (deprecated)'
- end
-
- context 'when user creates a cluster on AWS EKS' do
- before do
- click_link 'Amazon EKS'
- end
-
- it 'user sees a form to create an EKS cluster' do
- expect(page).to have_content('Authenticate with Amazon Web Services')
- end
- end
- end
-end
diff --git a/spec/features/projects/clusters/eks_spec.rb b/spec/features/projects/clusters/eks_spec.rb
deleted file mode 100644
index 7e599ff1198..00000000000
--- a/spec/features/projects/clusters/eks_spec.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'AWS EKS Cluster', :js do
- let(:project) { create(:project) }
- let(:user) { create(:user) }
-
- before do
- project.add_maintainer(user)
- gitlab_sign_in(user)
- allow(Projects::ClustersController).to receive(:STATUS_POLLING_INTERVAL) { 100 }
- stub_application_setting(eks_integration_enabled: true)
- end
-
- context 'when user does not have a cluster and visits cluster index page' do
- let(:project_id) { 'test-project-1234' }
-
- before do
- visit project_clusters_path(project)
-
- click_button(class: 'dropdown-toggle-split')
- click_link 'Create a cluster (certificate - deprecated)'
- end
-
- context 'when user creates a cluster on AWS EKS' do
- before do
- click_link 'Amazon EKS'
- end
-
- it 'highlights Amazon EKS logo' do
- expect(page).to have_css('.js-create-aws-cluster-button.active')
- end
- end
- end
-end
diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb
index 491121a3743..a8a23ba1c85 100644
--- a/spec/features/projects/clusters/gcp_spec.rb
+++ b/spec/features/projects/clusters/gcp_spec.rb
@@ -14,11 +14,6 @@ RSpec.describe 'Gcp Cluster', :js do
allow(Projects::ClustersController).to receive(:STATUS_POLLING_INTERVAL) { 100 }
end
- def submit_form
- execute_script('document.querySelector(".js-gke-cluster-creation-submit").removeAttribute("disabled")')
- execute_script('document.querySelector(".js-gke-cluster-creation-submit").click()')
- end
-
context 'when user has signed with Google' do
let(:project_id) { 'test-project-1234' }
@@ -29,82 +24,7 @@ RSpec.describe 'Gcp Cluster', :js do
.to receive(:expires_at_in_session).and_return(1.hour.since.to_i.to_s)
end
- context 'when user does not have a cluster and visits cluster index page' do
- before do
- visit project_clusters_path(project)
-
- visit_create_cluster_page
- click_link 'Google GKE'
- end
-
- it 'highlights Google GKE logo' do
- expect(page).to have_css('.js-create-gcp-cluster-button.active')
- end
-
- context 'when user filled form with valid parameters' do
- subject { submit_form }
-
- before do
- allow_any_instance_of(GoogleApi::CloudPlatform::Client)
- .to receive(:projects_zones_clusters_create) do
- double(
- 'cluster',
- self_link: 'projects/gcp-project-12345/zones/us-central1-a/operations/ope-123',
- status: 'RUNNING'
- )
- end
-
- allow(WaitForClusterCreationWorker).to receive(:perform_in).and_return(nil)
-
- expect(page).to have_css('.js-gcp-project-id-dropdown')
-
- execute_script('document.querySelector(".js-gcp-project-id-dropdown input").setAttribute("type", "text")')
- execute_script('document.querySelector(".js-gcp-zone-dropdown input").setAttribute("type", "text")')
- execute_script('document.querySelector(".js-gcp-machine-type-dropdown input").setAttribute("type", "text")')
-
- fill_in 'cluster[name]', with: 'dev-cluster'
- fill_in 'cluster[provider_gcp_attributes][gcp_project_id]', with: 'gcp-project-123'
- fill_in 'cluster[provider_gcp_attributes][zone]', with: 'us-central1-a'
- fill_in 'cluster[provider_gcp_attributes][machine_type]', with: 'n1-standard-2'
- end
-
- it 'users sees a form with the GCP token' do
- expect(page).to have_selector(:css, 'form[data-token="token"]')
- end
-
- it 'user sees a cluster details page and creation status' do
- subject
-
- expect(page).to have_content('Kubernetes cluster is being created...')
-
- Clusters::Cluster.last.provider.make_created!
-
- expect(page).to have_content('Kubernetes cluster was successfully created')
- end
-
- it 'user sees a error if something wrong during creation' do
- subject
-
- expect(page).to have_content('Kubernetes cluster is being created...')
-
- Clusters::Cluster.last.provider.make_errored!('Something wrong!')
-
- expect(page).to have_content('Something wrong!')
- end
- end
-
- context 'when user filled form with invalid parameters' do
- before do
- submit_form
- end
-
- it 'user sees a validation error' do
- expect(page).to have_css('.gl-field-error')
- end
- end
- end
-
- context 'when user does have a cluster and visits cluster page' do
+ context 'when user have a cluster and visits cluster page' do
let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
before do
@@ -167,12 +87,6 @@ RSpec.describe 'Gcp Cluster', :js do
it 'user sees offer on cluster index page' do
expect(page).to have_css('.gcp-signup-offer')
end
-
- it 'user sees offer on cluster create page' do
- visit_create_cluster_page
-
- expect(page).to have_css('.gcp-signup-offer')
- end
end
context 'when user has dismissed GCP signup offer' do
@@ -187,8 +101,6 @@ RSpec.describe 'Gcp Cluster', :js do
find('.gcp-signup-offer .js-close').click
wait_for_requests
- visit_create_cluster_page
-
expect(page).not_to have_css('.gcp-signup-offer')
end
end
@@ -216,9 +128,4 @@ RSpec.describe 'Gcp Cluster', :js do
expect(page).not_to have_css('.gcp-signup-offer')
end
end
-
- def visit_create_cluster_page
- click_button(class: 'dropdown-toggle-split')
- click_link 'Create a cluster (certificate - deprecated)'
- end
end
diff --git a/spec/features/projects/clusters_spec.rb b/spec/features/projects/clusters_spec.rb
index 0ecd7795964..9e1d66bc73e 100644
--- a/spec/features/projects/clusters_spec.rb
+++ b/spec/features/projects/clusters_spec.rb
@@ -81,101 +81,6 @@ RSpec.describe 'Clusters', :js do
end
end
end
-
- context 'when user adds a Google Kubernetes Engine cluster' do
- before do
- allow_any_instance_of(Projects::ClustersController)
- .to receive(:token_in_session).and_return('token')
- allow_any_instance_of(Projects::ClustersController)
- .to receive(:expires_at_in_session).and_return(1.hour.since.to_i.to_s)
-
- allow_any_instance_of(Projects::ClustersController).to receive(:authorize_google_project_billing)
- allow_any_instance_of(Projects::ClustersController).to receive(:google_project_billing_status).and_return(true)
-
- allow_any_instance_of(GoogleApi::CloudPlatform::Client)
- .to receive(:projects_zones_clusters_create) do
- double(
- 'cluster_control',
- self_link: 'projects/gcp-project-12345/zones/us-central1-a/operations/ope-123',
- status: 'RUNNING'
- )
- end
-
- allow(WaitForClusterCreationWorker).to receive(:perform_in).and_return(nil)
-
- create(:cluster, :provided_by_gcp, name: 'default-cluster', environment_scope: '*', projects: [project])
- visit project_clusters_path(project)
- click_link 'Certificate'
- end
-
- context 'when user filled form with environment scope' do
- before do
- visit_create_cluster_page
- click_link 'Google GKE'
-
- sleep 2 # wait for ajax
- execute_script('document.querySelector(".js-gcp-project-id-dropdown input").setAttribute("type", "text")')
- execute_script('document.querySelector(".js-gcp-zone-dropdown input").setAttribute("type", "text")')
- execute_script('document.querySelector(".js-gcp-machine-type-dropdown input").setAttribute("type", "text")')
- execute_script('document.querySelector(".js-gke-cluster-creation-submit").removeAttribute("disabled")')
-
- fill_in 'cluster_name', with: 'staging-cluster'
- fill_in 'cluster_environment_scope', with: 'staging/*'
- fill_in 'cluster[provider_gcp_attributes][gcp_project_id]', with: 'gcp-project-123'
- fill_in 'cluster[provider_gcp_attributes][zone]', with: 'us-central1-a'
- fill_in 'cluster[provider_gcp_attributes][machine_type]', with: 'n1-standard-2'
- click_button 'Create Kubernetes cluster'
-
- # The frontend won't show the details until the cluster is
- # created, and we don't want to make calls out to GCP.
- provider = Clusters::Cluster.last.provider
- provider.make_created
- end
-
- it 'user sees a cluster details page' do
- expect(page).to have_content('GitLab Integration')
- expect(page.find_field('cluster[environment_scope]').value).to eq('staging/*')
- end
- end
-
- context 'when user updates environment scope' do
- before do
- click_link 'default-cluster'
- fill_in 'cluster_environment_scope', with: 'production/*'
- within ".js-cluster-details-form" do
- click_button 'Save changes'
- end
- end
-
- it 'updates the environment scope' do
- expect(page.find_field('cluster[environment_scope]').value).to eq('production/*')
- end
- end
-
- context 'when user updates duplicated environment scope' do
- before do
- visit_create_cluster_page
- click_link 'Google GKE'
-
- sleep 2 # wait for ajax
- execute_script('document.querySelector(".js-gcp-project-id-dropdown input").setAttribute("type", "text")')
- execute_script('document.querySelector(".js-gcp-zone-dropdown input").setAttribute("type", "text")')
- execute_script('document.querySelector(".js-gcp-machine-type-dropdown input").setAttribute("type", "text")')
- execute_script('document.querySelector(".js-gke-cluster-creation-submit").removeAttribute("disabled")')
-
- fill_in 'cluster_name', with: 'staging-cluster'
- fill_in 'cluster_environment_scope', with: '*'
- fill_in 'cluster[provider_gcp_attributes][gcp_project_id]', with: 'gcp-project-123'
- fill_in 'cluster[provider_gcp_attributes][zone]', with: 'us-central1-a'
- fill_in 'cluster[provider_gcp_attributes][machine_type]', with: 'n1-standard-2'
- click_button 'Create Kubernetes cluster'
- end
-
- it 'users sees an environment scope validation error' do
- expect(page).to have_content('cannot add duplicated environment scope')
- end
- end
- end
end
context 'when user has a cluster and visits cluster index page' do
@@ -221,7 +126,7 @@ RSpec.describe 'Clusters', :js do
visit project_clusters_path(project)
click_button(class: 'dropdown-toggle-split')
- click_link 'Create a cluster (certificate - deprecated)'
+ click_link 'Create a cluster'
end
def visit_connect_cluster_page
diff --git a/spec/frontend/clusters/components/__snapshots__/new_cluster_spec.js.snap b/spec/frontend/clusters/components/__snapshots__/new_cluster_spec.js.snap
index 0bec2a5934e..656e72baf77 100644
--- a/spec/frontend/clusters/components/__snapshots__/new_cluster_spec.js.snap
+++ b/spec/frontend/clusters/components/__snapshots__/new_cluster_spec.js.snap
@@ -3,7 +3,7 @@
exports[`NewCluster renders the cluster component correctly 1`] = `
"
Enter your Kubernetes cluster certificate details
-
Enter details about your cluster. How do I use a certificate to connect to my cluster?
+
Enter details about your cluster. How do I use a certificate to connect to my cluster?