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 'Instance-level AWS EKS Cluster', :js do
|
2019-12-26 22:10:19 +05:30
|
|
|
let(:user) { create(:admin) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(user)
|
2021-02-22 17:27:13 +05:30
|
|
|
gitlab_enable_admin_mode_sign_in(user)
|
2022-05-07 20:08:51 +05:30
|
|
|
stub_application_setting(eks_integration_enabled: true)
|
2019-12-26 22:10:19 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
context 'when user does not have a cluster and visits group clusters page' do
|
|
|
|
before do
|
|
|
|
visit admin_clusters_path
|
|
|
|
|
2022-05-07 20:08:51 +05:30
|
|
|
click_button 'Actions'
|
|
|
|
click_link 'Create a new cluster'
|
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
|
2022-05-07 20:08:51 +05:30
|
|
|
expect(page).to have_content('Authenticate with Amazon Web Services')
|
2019-12-26 22:10:19 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|