Skip to content
Snippets Groups Projects
Commit 951616a2 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent e06d0e77
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -9,9 +9,12 @@ exports[`Remove cluster confirmation modal renders splitbutton with modal includ
class="btn btn-danger"
type="button"
>
Remove integration and resources
<span
class="gl-dropdown-toggle-text"
>
Remove integration and resources
</span>
<!---->
</button>
<button
Loading
Loading
Loading
Loading
@@ -613,6 +613,40 @@ describe Gitlab::Git::Blob, :seed_helper do
end
end
 
describe '#truncated?' do
context 'when blob.size is nil' do
let(:nil_size_blob) { Gitlab::Git::Blob.new(name: 'test', data: 'abcd') }
it 'returns false' do
expect(nil_size_blob.truncated?).to be_falsey
end
end
context 'when blob.data is missing' do
let(:nil_data_blob) { Gitlab::Git::Blob.new(name: 'test', size: 4) }
it 'returns false' do
expect(nil_data_blob.truncated?).to be_falsey
end
end
context 'when the blob is truncated' do
let(:truncated_blob) { Gitlab::Git::Blob.new(name: 'test', size: 40, data: 'abcd') }
it 'returns true' do
expect(truncated_blob.truncated?).to be_truthy
end
end
context 'when the blob is untruncated' do
let(:untruncated_blob) { Gitlab::Git::Blob.new(name: 'test', size: 4, data: 'abcd') }
it 'returns false' do
expect(untruncated_blob.truncated?).to be_falsey
end
end
end
describe 'metrics' do
it 'defines :gitlab_blob_truncated_true counter' do
expect(described_class).to respond_to(:gitlab_blob_truncated_true)
Loading
Loading
Loading
Loading
@@ -128,7 +128,7 @@ describe Gitlab::SidekiqConfig::CliMethods do
resource_boundary: :cpu
},
{
name: 'a_2',
name: 'a:2',
feature_category: :category_a,
has_external_dependencies: false,
latency_sensitive: true,
Loading
Loading
@@ -154,40 +154,40 @@ describe Gitlab::SidekiqConfig::CliMethods do
context 'with valid input' do
where(:query, :selected_queues) do
# feature_category
'feature_category=category_a' | %w(a a_2)
'feature_category=category_a,category_c' | %w(a a_2 c)
'feature_category=category_a|feature_category=category_c' | %w(a a_2 c)
'feature_category=category_a' | %w(a a:2)
'feature_category=category_a,category_c' | %w(a a:2 c)
'feature_category=category_a|feature_category=category_c' | %w(a a:2 c)
'feature_category!=category_a' | %w(b c)
 
# has_external_dependencies
'has_external_dependencies=true' | %w(b)
'has_external_dependencies=false' | %w(a a_2 c)
'has_external_dependencies=true,false' | %w(a a_2 b c)
'has_external_dependencies=true|has_external_dependencies=false' | %w(a a_2 b c)
'has_external_dependencies!=true' | %w(a a_2 c)
'has_external_dependencies=false' | %w(a a:2 c)
'has_external_dependencies=true,false' | %w(a a:2 b c)
'has_external_dependencies=true|has_external_dependencies=false' | %w(a a:2 b c)
'has_external_dependencies!=true' | %w(a a:2 c)
 
# latency_sensitive
'latency_sensitive=true' | %w(a_2 b)
'latency_sensitive=true' | %w(a:2 b)
'latency_sensitive=false' | %w(a c)
'latency_sensitive=true,false' | %w(a a_2 b c)
'latency_sensitive=true|latency_sensitive=false' | %w(a a_2 b c)
'latency_sensitive=true,false' | %w(a a:2 b c)
'latency_sensitive=true|latency_sensitive=false' | %w(a a:2 b c)
'latency_sensitive!=true' | %w(a c)
 
# name
'name=a' | %w(a)
'name=a,b' | %w(a b)
'name=a,a_2|name=b' | %w(a a_2 b)
'name!=a,a_2' | %w(b c)
'name=a,a:2|name=b' | %w(a a:2 b)
'name!=a,a:2' | %w(b c)
 
# resource_boundary
'resource_boundary=memory' | %w(b c)
'resource_boundary=memory,cpu' | %w(a b c)
'resource_boundary=memory|resource_boundary=cpu' | %w(a b c)
'resource_boundary!=memory,cpu' | %w(a_2)
'resource_boundary!=memory,cpu' | %w(a:2)
 
# combinations
'feature_category=category_a&latency_sensitive=true' | %w(a_2)
'feature_category=category_a&latency_sensitive=true|feature_category=category_c' | %w(a_2 c)
'feature_category=category_a&latency_sensitive=true' | %w(a:2)
'feature_category=category_a&latency_sensitive=true|feature_category=category_c' | %w(a:2 c)
end
 
with_them do
Loading
Loading
Loading
Loading
@@ -9,6 +9,7 @@ describe PagesDomain do
 
describe 'associations' do
it { is_expected.to belong_to(:project) }
it { is_expected.to have_many(:serverless_domain_clusters) }
end
 
describe 'validate domain' do
Loading
Loading
# frozen_string_literal: true
 
RSpec.shared_examples 'import measurement' do
RSpec.shared_examples 'measurable' do
context 'when measurement is enabled' do
let(:measurement_enabled) { true }
 
Loading
Loading
# frozen_string_literal: true
require 'rake_helper'
describe 'gitlab:import_export:export rake task' do
let(:username) { 'root' }
let(:namespace_path) { username }
let!(:user) { create(:user, username: username) }
let(:measurement_enabled) { false }
let(:task_params) { [username, namespace_path, project_name, archive_path, measurement_enabled] }
before do
Rake.application.rake_require('tasks/gitlab/import_export/export')
end
subject { run_rake_task('gitlab:import_export:export', task_params) }
context 'when project is found' do
let(:project) { create(:project, creator: user, namespace: user.namespace) }
let(:project_name) { project.name }
let(:archive_path) { 'spec/fixtures/gitlab/import_export/test_project_export.tar.gz' }
around do |example|
example.run
ensure
File.delete(archive_path)
end
it 'performs project export successfully' do
expect { subject }.to output(/Done!/).to_stdout
expect(File).to exist(archive_path)
end
it_behaves_like 'measurable'
end
end
Loading
Loading
@@ -70,7 +70,7 @@ describe 'gitlab:import_export:import rake task' do
subject
end
 
it_behaves_like 'import measurement'
it_behaves_like 'measurable'
end
 
context 'when project import is invalid' do
Loading
Loading
Loading
Loading
@@ -745,10 +745,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.99.0.tgz#bcf971c3a14920218e86da71ca115244b23a4a3f"
integrity sha512-bxYFxnmuoWPBU9isL3/CYFlr+k2YWU47Pq0vfmSmL7uLnb/vYymfZZF5p3erlZ62WGwuT3kp4GnuoZBMfmannA==
 
"@gitlab/ui@^9.11.1":
version "9.11.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-9.11.1.tgz#f234687d2d1b555ebeaf05156e16b4fd97aef453"
integrity sha512-3INIA2n9rxz+VCc0hO4EnmET00XCAMS25hHnIJ6ffKeJz40diCvEZ6Asusv4BiIPosmTyz8VufYGQRq+8v8rNQ==
"@gitlab/ui@^9.11.2":
version "9.11.2"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-9.11.2.tgz#ffb58bb10c6a8cd503a622946ed78512e9c18c6d"
integrity sha512-9acsjQ9+hSaAIGpiARNF4XfQUhulWiausns9JUTrN9XEQpa1o/EsDYqwP0HfSOMZ8JhnjSI2NGYVf+LIH5oudg==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0"
Loading
Loading
@@ -11626,16 +11626,11 @@ uuid@3.3.2, uuid@^3.0.1, uuid@^3.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==
 
v8-compile-cache@2.0.3:
v8-compile-cache@2.0.3, v8-compile-cache@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe"
integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==
 
v8-compile-cache@^2.0.3:
version "2.1.0"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e"
integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==
validate-npm-package-license@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment