summaryrefslogtreecommitdiff
path: root/spec/features/projects/clusters
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-09-06 10:03:38 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-09-06 10:03:38 +0000
commit6f2ad2b6041b8a007df7eb8c4f477c24cc153ac3 (patch)
tree7b190f17b6da295cf3599174f48c0fbc060ddbb1 /spec/features/projects/clusters
parenta2ea32dd44cc4a104e404325c73a77151913a946 (diff)
downloadgitlab-ce-6f2ad2b6041b8a007df7eb8c4f477c24cc153ac3.tar.gz
Enable Kubernetes RBAC for GitLab Managed Apps for existing clusters
Diffstat (limited to 'spec/features/projects/clusters')
-rw-r--r--spec/features/projects/clusters/user_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/projects/clusters/user_spec.rb b/spec/features/projects/clusters/user_spec.rb
index babf47cc341..ec968bfcf7d 100644
--- a/spec/features/projects/clusters/user_spec.rb
+++ b/spec/features/projects/clusters/user_spec.rb
@@ -38,6 +38,28 @@ describe 'User Cluster', :js do
end
end
+ context 'rbac_clusters feature flag is enabled' do
+ before do
+ stub_feature_flags(rbac_clusters: true)
+
+ fill_in 'cluster_name', with: 'dev-cluster'
+ fill_in 'cluster_platform_kubernetes_attributes_api_url', with: 'http://example.com'
+ fill_in 'cluster_platform_kubernetes_attributes_token', with: 'my-token'
+ check 'cluster_platform_kubernetes_attributes_authorization_type'
+ click_button 'Add Kubernetes cluster'
+ end
+
+ it 'user sees a cluster details page' do
+ expect(page).to have_content('Kubernetes cluster integration')
+ expect(page.find_field('cluster[name]').value).to eq('dev-cluster')
+ expect(page.find_field('cluster[platform_kubernetes_attributes][api_url]').value)
+ .to have_content('http://example.com')
+ expect(page.find_field('cluster[platform_kubernetes_attributes][token]').value)
+ .to have_content('my-token')
+ expect(page.find_field('cluster[platform_kubernetes_attributes][authorization_type]', disabled: true)).to be_checked
+ end
+ end
+
context 'when user filled form with invalid parameters' do
before do
click_button 'Add Kubernetes cluster'