summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-25 20:30:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-25 20:30:46 +0000
commit1d287b31040662f1cc53a61b866ea97931a6b850 (patch)
tree64c1ff71f40695c1d516a7b24cabf06c408685f1 /spec
parentfdcb3d47df0526a9dc437c847683df8aae1e5d58 (diff)
downloadgitlab-ce-1d287b31040662f1cc53a61b866ea97931a6b850.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-ee
Diffstat (limited to 'spec')
-rw-r--r--spec/features/merge_request/user_creates_image_diff_notes_spec.rb5
-rw-r--r--spec/fixtures/emails/no_content_type.eml18
-rw-r--r--spec/lib/gitlab/email/attachment_uploader_spec.rb10
-rw-r--r--spec/lib/google_api/cloud_platform/client_spec.rb1
4 files changed, 32 insertions, 2 deletions
diff --git a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb
index 3cd23764382..cc0d7a279dd 100644
--- a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb
+++ b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb
@@ -278,8 +278,9 @@ RSpec.describe 'Merge request > User creates image diff notes', :js do
end
def create_image_diff_note
- expand_text = 'Click to expand it.'
- page.all('a', text: expand_text, wait: false).each do |element|
+ wait_for_all_requests
+
+ page.all('a', text: 'Click to expand it.', wait: false).each do |element|
element.click
end
diff --git a/spec/fixtures/emails/no_content_type.eml b/spec/fixtures/emails/no_content_type.eml
new file mode 100644
index 00000000000..18232851bb9
--- /dev/null
+++ b/spec/fixtures/emails/no_content_type.eml
@@ -0,0 +1,18 @@
+Return-path: <frank@example.org>
+Envelope-to: gitlab+gitlab-instance-administrators-9a72b788-code-hello-world-php-2-issue-@qyber.black
+Delivery-date: Sun, 23 May 2021 10:28:57 +0100
+Received: from example.plus.com ([212.159.19.195] helo=nut.example.org)
+ by se.example.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
+ (Exim 4.93)
+ (envelope-from <frank@example.org>)
+ id 1lkkPp-009OFG-9z
+ for gitlab+gitlab-instance-administrators-9a72b788-code-hello-world-php-2-issue-@qyber.black; Sun, 23 May 2021 10:28:57 +0100
+Received: ***REMOVED***
+To: <gitlab+gitlab-instance-administrators-9a72b788-code-hello-world-php-2-issue-@qyber.black>
+X-Mailer: mail (GNU Mailutils 3.10)
+Message-Id: <E1lkkPn-00DuvG-Rf@set>
+From: Frank C Example <frank@example.org>
+Date: Sun, 23 May 2021 10:28:55 +0100
+Subject: Testing Service Desk E-Mail
+
+Test.
diff --git a/spec/lib/gitlab/email/attachment_uploader_spec.rb b/spec/lib/gitlab/email/attachment_uploader_spec.rb
index 6beadb6e1a5..4b4e671f001 100644
--- a/spec/lib/gitlab/email/attachment_uploader_spec.rb
+++ b/spec/lib/gitlab/email/attachment_uploader_spec.rb
@@ -46,5 +46,15 @@ RSpec.describe Gitlab::Email::AttachmentUploader do
expect(image_link[:url]).to include('gitlab_logo.png')
end
end
+
+ context 'with a message with no content type' do
+ let(:message_raw) { fixture_file("emails/no_content_type.eml") }
+
+ it 'uploads all attachments except the signature' do
+ links = described_class.new(message).execute(upload_parent: project, uploader_class: FileUploader)
+
+ expect(links).to eq([])
+ end
+ end
end
end
diff --git a/spec/lib/google_api/cloud_platform/client_spec.rb b/spec/lib/google_api/cloud_platform/client_spec.rb
index d217699f79d..b674ae0218f 100644
--- a/spec/lib/google_api/cloud_platform/client_spec.rb
+++ b/spec/lib/google_api/cloud_platform/client_spec.rb
@@ -91,6 +91,7 @@ RSpec.describe GoogleApi::CloudPlatform::Client do
cluster: {
name: cluster_name,
initial_node_count: cluster_size,
+ initial_cluster_version: '1.18',
node_config: {
machine_type: machine_type,
oauth_scopes: [