2019-12-26 22:10:19 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
RSpec.describe 'Group AWS EKS Cluster', :js do
|
2019-12-26 22:10:19 +05:30
|
|
|
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)
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when user does not have a cluster and visits group clusters page' do
|
|
|
|
before do
|
|
|
|
visit group_clusters_path(group)
|
|
|
|
|
2021-01-03 14:25:43 +05:30
|
|
|
click_link 'Integrate with a cluster certificate'
|
2019-12-26 22:10:19 +05:30
|
|
|
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
|
2020-01-01 13:55:28 +05:30
|
|
|
expect(page).to have_content('Create new cluster on EKS')
|
2019-12-26 22:10:19 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|