Read about our upcoming Code of Conduct on this issue

Commit 2b257942 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 0fcf68b1cc63
......@@ -39,12 +39,14 @@
gcp_cluster = create(:cluster_provider_gcp, :created).cluster
create(:cluster_provider_aws, :created)
create(:cluster_platform_kubernetes)
create(:cluster, :management_project, management_project: projects[0])
create(:cluster, :group)
create(:cluster, :instance, :production_environment)
# Disabled clusters
create(:cluster, :disabled)
create(:cluster, :group, :disabled)
create(:cluster, :group, :disabled)
create(:cluster, :instance, :disabled)
# Applications
create(:clusters_applications_helm, :installed, cluster: gcp_cluster)
......
......@@ -123,7 +123,7 @@
project = create(:project, namespace: group)
other_project = create(:project)
other_project.project_group_links.create(group: group,
group_access: ProjectGroupLink::MAINTAINER)
group_access: Gitlab::Access::MAINTAINER)
expect(finder.execute).to contain_exactly(project)
end
......
import { shallowMount } from '@vue/test-utils';
import JiraImportApp from '~/jira_import/components/jira_import_app.vue';
import JiraImportSetup from '~/jira_import/components/jira_import_setup.vue';
describe('JiraImportApp', () => {
let wrapper;
afterEach(() => {
wrapper.destroy();
wrapper = null;
});
describe('set up Jira integration page', () => {
beforeEach(() => {
wrapper = shallowMount(JiraImportApp, {
propsData: {
isJiraConfigured: true,
projectPath: 'gitlab-org/gitlab-test',
setupIllustration: 'illustration.svg',
},
});
});
it('is shown when Jira integration is not configured', () => {
wrapper.setProps({
isJiraConfigured: false,
});
return wrapper.vm.$nextTick(() => {
expect(wrapper.find(JiraImportSetup).exists()).toBe(true);
});
});
it('is not shown when Jira integration is configured', () => {
expect(wrapper.find(JiraImportSetup).exists()).toBe(false);
});
});
});
import { shallowMount } from '@vue/test-utils';
import JiraImportSetup from '~/jira_import/components/jira_import_setup.vue';
describe('JiraImportSetup', () => {
let wrapper;
beforeEach(() => {
wrapper = shallowMount(JiraImportSetup, {
propsData: {
illustration: 'illustration.svg',
},
});
});
afterEach(() => {
wrapper.destroy();
wrapper = null;
});
it('displays a message to the user', () => {
const message = 'You will first need to set up Jira Integration to use this feature.';
expect(wrapper.find('p').text()).toBe(message);
});
it('contains button to set up Jira integration', () => {
expect(wrapper.find('a').text()).toBe('Set up Jira Integration');
});
});
......@@ -58,13 +58,14 @@
expect(count_data[:issues_with_embedded_grafana_charts_approx]).to eq(2)
expect(count_data[:incident_issues]).to eq(4)
expect(count_data[:clusters_enabled]).to eq(4)
expect(count_data[:project_clusters_enabled]).to eq(3)
expect(count_data[:clusters_enabled]).to eq(6)
expect(count_data[:project_clusters_enabled]).to eq(4)
expect(count_data[:group_clusters_enabled]).to eq(1)
expect(count_data[:instance_clusters_enabled]).to eq(1)
expect(count_data[:clusters_disabled]).to eq(3)
expect(count_data[:project_clusters_disabled]).to eq(1)
expect(count_data[:group_clusters_disabled]).to eq(2)
expect(count_data[:group_clusters_enabled]).to eq(1)
expect(count_data[:group_clusters_disabled]).to eq(1)
expect(count_data[:instance_clusters_disabled]).to eq(1)
expect(count_data[:clusters_platforms_eks]).to eq(1)
expect(count_data[:clusters_platforms_gke]).to eq(1)
expect(count_data[:clusters_platforms_user]).to eq(1)
......@@ -78,6 +79,7 @@
expect(count_data[:clusters_applications_elastic_stack]).to eq(1)
expect(count_data[:grafana_integrated_projects]).to eq(2)
expect(count_data[:clusters_applications_jupyter]).to eq(1)
expect(count_data[:clusters_management_project]).to eq(1)
end
it 'works when queries time out' do
......
......@@ -156,6 +156,22 @@
end
end
describe '.with_management_project' do
subject { described_class.with_management_project }
context 'cluster has a management project' do
let!(:cluster) { create(:cluster, :management_project) }
it { is_expected.to include(cluster) }
end
context 'cluster does not have a management project' do
let!(:cluster) { create(:cluster) }
it { is_expected.not_to include(cluster) }
end
end
describe '.for_project_namespace' do
subject { described_class.for_project_namespace(namespace_id) }
......
......@@ -15,6 +15,22 @@
it { is_expected.to belong_to(:shared_with_group) }
end
describe 'scopes' do
describe '.non_guests' do
let!(:group_group_link_reporter) { create :group_group_link, :reporter }
let!(:group_group_link_maintainer) { create :group_group_link, :maintainer }
let!(:group_group_link_owner) { create :group_group_link, :owner }
let!(:group_group_link_guest) { create :group_group_link, :guest }
it 'returns all records which are greater than Guests access' do
expect(described_class.non_guests).to match_array([
group_group_link_reporter, group_group_link,
group_group_link_maintainer, group_group_link_owner
])
end
end
end
describe 'validation' do
it { is_expected.to validate_presence_of(:shared_group) }
......
......@@ -32,6 +32,23 @@
end
end
describe 'scopes' do
describe '.non_guests' do
let!(:project_group_link_reporter) { create :project_group_link, :reporter }
let!(:project_group_link_maintainer) { create :project_group_link, :maintainer }
let!(:project_group_link_developer) { create :project_group_link }
let!(:project_group_link_guest) { create :project_group_link, :guest }
it 'returns all records which are greater than Guests access' do
expect(described_class.non_guests).to match_array([
project_group_link_reporter,
project_group_link_developer,
project_group_link_maintainer
])
end
end
end
describe "destroying a record", :delete do
it "refreshes group users' authorized projects" do
project = create(:project, :private)
......
......@@ -582,7 +582,7 @@
{
'action' => 'geo_proxy_to_primary',
'data' => {
'api_endpoints' => %w{geo/proxy_git_push_ssh/info_refs geo/proxy_git_push_ssh/push},
'api_endpoints' => %w{geo/proxy_git_ssh/info_refs_receive_pack geo/proxy_git_ssh/receive_pack},
'gl_username' => 'testuser',
'primary_repo' => 'http://localhost:3000/testuser/repo.git'
}
......
......@@ -43,9 +43,11 @@ module UsageDataHelpers
clusters_enabled
project_clusters_enabled
group_clusters_enabled
instance_clusters_enabled
clusters_disabled
project_clusters_disabled
group_clusters_disabled
instance_clusters_disabled
clusters_platforms_eks
clusters_platforms_gke
clusters_platforms_user
......@@ -58,6 +60,7 @@ module UsageDataHelpers
clusters_applications_knative
clusters_applications_elastic_stack
clusters_applications_jupyter
clusters_management_project
in_review_folder
grafana_integrated_projects
groups
......
......@@ -52,6 +52,7 @@
replicator.calculate_checksum!
expect(model_record.reload.verification_checksum).not_to be_nil
expect(model_record.reload.verified_at).not_to be_nil
end
it 'saves the error message and increments retry counter' do
......
......@@ -781,15 +781,15 @@
eslint-plugin-vue "^6.2.1"
vue-eslint-parser "^7.0.0"
"@gitlab/svgs@1.117.0":
version "1.117.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.117.0.tgz#05239ddcf529c62ca29e1ec1a25a7e24efb98207"
integrity sha512-dGy/VWuRAFCTZX3Yqu1+RnAHTSUWafteIk/RMfUCN9B/EMbYzjhYsNy0NLVoZ23Rj/KGv1bUGHvyQCoPP6VzpA==
"@gitlab/ui@11.1.0":
version "11.1.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-11.1.0.tgz#72dd6d4309909fd1874f8abc42be8365e875822e"
integrity sha512-lmHTIUIYuUSGiisvnndhpUASvXZokP8/1LBfws9qkbEFPnMIvJAxGRHo3F7dLjcDBCvy4xepgDFFjI6HNFhLWA==
"@gitlab/svgs@1.119.0":
version "1.119.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.119.0.tgz#ff35c160b1e726f4f1702a4a152712fb669cde4e"
integrity sha512-bI+kewDLJy1N0//BpUPMx3h5AqG6lfIiV53lxQP9ttn8j/jhyxigZXq1wZ901PI4/ALv9IY1DOSSuLouK4sJsQ==
"@gitlab/ui@11.2.1":
version "11.2.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-11.2.1.tgz#c031c92204eb2a6036ae3c7482387f66c75524fd"
integrity sha512-AhDPYmrBtaW6Qu+inSjoMCWx+Ou3CVIhhGAEjyVsAG7rSOilevVMZui2IlSb6fPtLcXS8F78DTWjp3R1YgxxbQ==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment