summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-25 03:09:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-25 03:09:30 +0000
commitc916c6f79b74dd3daf9bdbd7a9fdcb545237d46e (patch)
treea4022943f6680d6ab6d72828cd11b9a10fc5b50c
parent802594d2a7772ed16b844d0a7b91352fa6c573c9 (diff)
downloadgitlab-ce-c916c6f79b74dd3daf9bdbd7a9fdcb545237d46e.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/models/terraform/state_version.rb6
-rw-r--r--changelogs/unreleased/mw-vsa-limit-warnings-icon-refactor.yml5
-rw-r--r--config/initializers_before_autoloader/000_inflections.rb3
-rw-r--r--doc/administration/gitaly/index.md6
-rw-r--r--doc/administration/monitoring/prometheus/gitlab_metrics.md6
-rw-r--r--doc/api/geo_nodes.md8
-rw-r--r--doc/api/graphql/reference/gitlab_schema.graphql25
-rw-r--r--doc/api/graphql/reference/gitlab_schema.json75
-rw-r--r--doc/user/gitlab_com/index.md4
-rw-r--r--qa/qa/specs/features/sanity/framework_spec.rb2
-rw-r--r--qa/spec/factory/resource/user_spec.rb2
-rw-r--r--qa/spec/git/location_spec.rb2
-rw-r--r--qa/spec/git/repository_spec.rb2
-rw-r--r--qa/spec/page/base_spec.rb2
-rw-r--r--qa/spec/page/element_spec.rb2
-rw-r--r--qa/spec/page/logging_spec.rb2
-rw-r--r--qa/spec/page/validator_spec.rb2
-rw-r--r--qa/spec/page/view_spec.rb2
-rw-r--r--qa/spec/resource/api_fabricator_spec.rb2
-rw-r--r--qa/spec/resource/base_spec.rb2
-rw-r--r--qa/spec/resource/events/base_spec.rb2
-rw-r--r--qa/spec/resource/events/project_spec.rb2
-rw-r--r--qa/spec/resource/repository/push_spec.rb2
-rw-r--r--qa/spec/resource/ssh_key_spec.rb2
-rw-r--r--qa/spec/resource/user_spec.rb2
-rw-r--r--qa/spec/runtime/api/client_spec.rb2
-rw-r--r--qa/spec/runtime/api/request_spec.rb2
-rw-r--r--qa/spec/runtime/application_settings_spec.rb2
-rw-r--r--qa/spec/runtime/env_spec.rb2
-rw-r--r--qa/spec/runtime/feature_spec.rb2
-rw-r--r--qa/spec/runtime/key/ecdsa_spec.rb2
-rw-r--r--qa/spec/runtime/key/ed25519_spec.rb2
-rw-r--r--qa/spec/runtime/key/rsa_spec.rb2
-rw-r--r--qa/spec/runtime/logger_spec.rb2
-rw-r--r--qa/spec/runtime/namespace_spec.rb2
-rw-r--r--qa/spec/runtime/release_spec.rb2
-rw-r--r--qa/spec/runtime/scenario_spec.rb2
-rw-r--r--qa/spec/scenario/actable_spec.rb2
-rw-r--r--qa/spec/scenario/bootable_spec.rb2
-rw-r--r--qa/spec/scenario/template_spec.rb2
-rw-r--r--qa/spec/scenario/test/instance/airgapped_spec.rb2
-rw-r--r--qa/spec/scenario/test/instance/all_spec.rb2
-rw-r--r--qa/spec/scenario/test/instance/smoke_spec.rb2
-rw-r--r--qa/spec/scenario/test/integration/github_spec.rb2
-rw-r--r--qa/spec/scenario/test/integration/instance_saml_spec.rb2
-rw-r--r--qa/spec/scenario/test/integration/kubernetes_spec.rb2
-rw-r--r--qa/spec/scenario/test/integration/ldap_spec.rb6
-rw-r--r--qa/spec/scenario/test/integration/mattermost_spec.rb2
-rw-r--r--qa/spec/scenario/test/integration/object_storage_spec.rb2
-rw-r--r--qa/spec/scenario/test/sanity/framework_spec.rb2
-rw-r--r--qa/spec/scenario/test/sanity/selectors_spec.rb2
-rw-r--r--qa/spec/specs/helpers/quarantine_spec.rb2
-rw-r--r--qa/spec/specs/parallel_runner_spec.rb2
-rw-r--r--qa/spec/specs/runner_spec.rb2
-rw-r--r--qa/spec/support/repeater_spec.rb2
-rw-r--r--qa/spec/support/retrier_spec.rb2
-rw-r--r--qa/spec/support/wait_for_requests_spec.rb2
-rw-r--r--qa/spec/support/waiter_spec.rb2
-rw-r--r--spec/factories/terraform/state_version.rb8
-rw-r--r--spec/models/terraform/state_spec.rb4
-rw-r--r--spec/models/terraform/state_version_spec.rb2
-rw-r--r--spec/requests/api/terraform/state_spec.rb2
-rw-r--r--spec/support/helpers/stub_object_storage.rb11
63 files changed, 203 insertions, 64 deletions
diff --git a/app/models/terraform/state_version.rb b/app/models/terraform/state_version.rb
index d5e315d18a1..eff44485401 100644
--- a/app/models/terraform/state_version.rb
+++ b/app/models/terraform/state_version.rb
@@ -14,5 +14,11 @@ module Terraform
mount_file_store_uploader VersionedStateUploader
delegate :project_id, :uuid, to: :terraform_state, allow_nil: true
+
+ def local?
+ file_store == ObjectStorage::Store::LOCAL
+ end
end
end
+
+Terraform::StateVersion.prepend_if_ee('EE::Terraform::StateVersion')
diff --git a/changelogs/unreleased/mw-vsa-limit-warnings-icon-refactor.yml b/changelogs/unreleased/mw-vsa-limit-warnings-icon-refactor.yml
new file mode 100644
index 00000000000..0d4051dae79
--- /dev/null
+++ b/changelogs/unreleased/mw-vsa-limit-warnings-icon-refactor.yml
@@ -0,0 +1,5 @@
+---
+title: 'VSA: Replace fa-warning with GitLab SVG'
+merge_request: 43262
+author:
+type: changed
diff --git a/config/initializers_before_autoloader/000_inflections.rb b/config/initializers_before_autoloader/000_inflections.rb
index a34b75d0382..f9d1eedde4e 100644
--- a/config/initializers_before_autoloader/000_inflections.rb
+++ b/config/initializers_before_autoloader/000_inflections.rb
@@ -24,11 +24,12 @@ ActiveSupport::Inflector.inflections do |inflect|
project_auto_devops
project_registry
project_statistics
+ snippet_repository_registry
system_note_metadata
terraform_state_registry
+ terraform_state_version_registry
vulnerabilities_feedback
vulnerability_feedback
- snippet_repository_registry
)
inflect.acronym 'EE'
inflect.acronym 'CSP'
diff --git a/doc/administration/gitaly/index.md b/doc/administration/gitaly/index.md
index a43dedbd49c..dea5e5c3b9d 100644
--- a/doc/administration/gitaly/index.md
+++ b/doc/administration/gitaly/index.md
@@ -532,13 +532,9 @@ corresponding to each Gitaly server must be installed on that Gitaly server.
Additionally, the certificate (or its certificate authority) must be installed on all:
-- Gitaly servers, including the Gitaly server using the certificate.
+- Gitaly servers.
- Gitaly clients that communicate with it.
-The process is documented in the
-[GitLab custom certificate configuration](https://docs.gitlab.com/omnibus/settings/ssl.html#install-custom-public-certificates)
-and repeated below.
-
Note the following:
- The certificate must specify the address you use to access the Gitaly server. If you are:
diff --git a/doc/administration/monitoring/prometheus/gitlab_metrics.md b/doc/administration/monitoring/prometheus/gitlab_metrics.md
index 370c72458fa..df40455d89e 100644
--- a/doc/administration/monitoring/prometheus/gitlab_metrics.md
+++ b/doc/administration/monitoring/prometheus/gitlab_metrics.md
@@ -190,6 +190,12 @@ configuration option in `gitlab.yml`. These metrics are served from the
| `geo_terraform_states_synced` | Gauge | 13.3 | Number of syncable terraform states synced on secondary | `url` |
| `geo_terraform_states_failed` | Gauge | 13.3 | Number of syncable terraform states failed to sync on secondary | `url` |
| `geo_terraform_states_registry` | Gauge | 13.3 | Number of terraform states in the registry | `url` |
+| `geo_terraform_state_versions` | Gauge | 13.5 | Number of terraform state versions on primary | `url` |
+| `geo_terraform_state_versions_checksummed` | Gauge | 13.5 | Number of terraform state versions checksummed on primary | `url` |
+| `geo_terraform_state_versions_checksum_failed` | Gauge | 13.5 | Number of terraform state versions failed to calculate the checksum on primary | `url` |
+| `geo_terraform_state_versions_synced` | Gauge | 13.5 | Number of syncable terraform state versions synced on secondary | `url` |
+| `geo_terraform_state_versions_failed` | Gauge | 13.5 | Number of syncable terraform state versions failed to sync on secondary | `url` |
+| `geo_terraform_state_versions_registry` | Gauge | 13.5 | Number of terraform state versions in the registry | `url` |
| `global_search_bulk_cron_queue_size` | Gauge | 12.10 | Number of database records waiting to be synchronized to Elasticsearch | |
| `global_search_awaiting_indexing_queue_size` | Gauge | 13.2 | Number of database updates waiting to be synchronized to Elasticsearch while indexing is paused | |
| `geo_merge_request_diffs` | Gauge | 13.4 | Number of merge request diffs on primary | `url` |
diff --git a/doc/api/geo_nodes.md b/doc/api/geo_nodes.md
index 8d2052f7373..ce58982d407 100644
--- a/doc/api/geo_nodes.md
+++ b/doc/api/geo_nodes.md
@@ -465,7 +465,13 @@ Example response:
"terraform_states_checksum_failed_count": 0,
"terraform_states_registry_count": 10,
"terraform_states_synced_count": 6,
- "terraform_states_failed_count": 3
+ "terraform_states_failed_count": 3,
+ "terraform_state_versions_count": 10,
+ "terraform_state_versions_checksummed_count": 10,
+ "terraform_state_versions_checksum_failed_count": 0,
+ "terraform_state_versions_registry_count": 10,
+ "terraform_state_versions_synced_count": 6,
+ "terraform_state_versions_failed_count": 3,
"snippet_repositories_count": 10,
"snippet_repositories_checksummed_count": 10,
"snippet_repositories_checksum_failed_count": 0,
diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql
index f898e79cab8..030741b3171 100644
--- a/doc/api/graphql/reference/gitlab_schema.graphql
+++ b/doc/api/graphql/reference/gitlab_schema.graphql
@@ -15401,6 +15401,26 @@ type SastCiConfigurationAnalyzersEntityEdge {
}
"""
+Represents the analyzers entity in SAST CI configuration
+"""
+input SastCiConfigurationAnalyzersEntityInput {
+ """
+ State of the analyzer
+ """
+ enabled: Boolean!
+
+ """
+ Name of analyzer
+ """
+ name: String!
+
+ """
+ List of variables for the analyzer
+ """
+ variables: [SastCiConfigurationEntityInput!]
+}
+
+"""
Represents an entity in SAST CI configuration
"""
type SastCiConfigurationEntity {
@@ -15525,6 +15545,11 @@ Represents a CI configuration of SAST
"""
input SastCiConfigurationInput {
"""
+ List of analyzers and related variables for the SAST configuration
+ """
+ analyzers: [SastCiConfigurationAnalyzersEntityInput!]
+
+ """
List of global entities related to SAST configuration
"""
global: [SastCiConfigurationEntityInput!]
diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json
index d7ec17122c9..a7036d45ea2 100644
--- a/doc/api/graphql/reference/gitlab_schema.json
+++ b/doc/api/graphql/reference/gitlab_schema.json
@@ -44827,6 +44827,63 @@
"possibleTypes": null
},
{
+ "kind": "INPUT_OBJECT",
+ "name": "SastCiConfigurationAnalyzersEntityInput",
+ "description": "Represents the analyzers entity in SAST CI configuration",
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "name",
+ "description": "Name of analyzer",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "enabled",
+ "description": "State of the analyzer",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "variables",
+ "description": "List of variables for the analyzer",
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "SastCiConfigurationEntityInput",
+ "ofType": null
+ }
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
"kind": "OBJECT",
"name": "SastCiConfigurationEntity",
"description": "Represents an entity in SAST CI configuration",
@@ -45196,6 +45253,24 @@
}
},
"defaultValue": null
+ },
+ {
+ "name": "analyzers",
+ "description": "List of analyzers and related variables for the SAST configuration",
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "SastCiConfigurationAnalyzersEntityInput",
+ "ofType": null
+ }
+ }
+ },
+ "defaultValue": null
}
],
"interfaces": null,
diff --git a/doc/user/gitlab_com/index.md b/doc/user/gitlab_com/index.md
index 67dd31efe2c..93f2c09fd9b 100644
--- a/doc/user/gitlab_com/index.md
+++ b/doc/user/gitlab_com/index.md
@@ -474,6 +474,10 @@ More information on this particular change can be found at
of proposed changes can be found at
<https://gitlab.com/gitlab-com/infrastructure/-/issues?scope=all&utf8=%E2%9C%93&state=opened&label_name[]=database&label_name[]=change>.
+## Puma
+
+GitLab.com uses the default of 60 seconds for [Puma request timeouts](https://docs.gitlab.com/omnibus/settings/puma.html#worker-timeout).
+
## Unicorn
GitLab.com adjusts the memory limits for the [unicorn-worker-killer](https://rubygems.org/gems/unicorn-worker-killer) gem.
diff --git a/qa/qa/specs/features/sanity/framework_spec.rb b/qa/qa/specs/features/sanity/framework_spec.rb
index 611c6c7b1ff..feec56478c0 100644
--- a/qa/qa/specs/features/sanity/framework_spec.rb
+++ b/qa/qa/specs/features/sanity/framework_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Framework sanity checks', :orchestrated, :framework do
+ RSpec.describe 'Framework sanity checks', :orchestrated, :framework do
describe 'Passing orchestrated example' do
it 'succeeds' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
diff --git a/qa/spec/factory/resource/user_spec.rb b/qa/spec/factory/resource/user_spec.rb
index d59ee24c758..1adf3799b0e 100644
--- a/qa/spec/factory/resource/user_spec.rb
+++ b/qa/spec/factory/resource/user_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Resource::User do
+RSpec.describe QA::Resource::User do
describe "#fabricate_via_api!" do
response = Struct.new(:code, :body)
diff --git a/qa/spec/git/location_spec.rb b/qa/spec/git/location_spec.rb
index 0c57291666f..ee714206e4f 100644
--- a/qa/spec/git/location_spec.rb
+++ b/qa/spec/git/location_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Git::Location do
+RSpec.describe QA::Git::Location do
describe '.new' do
context 'when URI starts with ssh://' do
context 'when URI has port' do
diff --git a/qa/spec/git/repository_spec.rb b/qa/spec/git/repository_spec.rb
index 941e68235dc..2ac7a99d82f 100644
--- a/qa/spec/git/repository_spec.rb
+++ b/qa/spec/git/repository_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Git::Repository do
+RSpec.describe QA::Git::Repository do
include Helpers::StubENV
shared_context 'unresolvable git directory' do
diff --git a/qa/spec/page/base_spec.rb b/qa/spec/page/base_spec.rb
index 0cbb0a2b12e..52345876149 100644
--- a/qa/spec/page/base_spec.rb
+++ b/qa/spec/page/base_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Page::Base do
+RSpec.describe QA::Page::Base do
describe 'page helpers' do
it 'exposes helpful page helpers' do
expect(subject).to respond_to :refresh, :wait_until, :scroll_to
diff --git a/qa/spec/page/element_spec.rb b/qa/spec/page/element_spec.rb
index 3f64743ffac..fbf58b5e18a 100644
--- a/qa/spec/page/element_spec.rb
+++ b/qa/spec/page/element_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Page::Element do
+RSpec.describe QA::Page::Element do
describe '#selector' do
it 'transforms element name into QA-specific selector' do
expect(described_class.new(:sign_in_button).selector)
diff --git a/qa/spec/page/logging_spec.rb b/qa/spec/page/logging_spec.rb
index f2ce9fb2cf8..df3447770be 100644
--- a/qa/spec/page/logging_spec.rb
+++ b/qa/spec/page/logging_spec.rb
@@ -3,7 +3,7 @@
require 'capybara/dsl'
require 'logger'
-describe QA::Support::Page::Logging do
+RSpec.describe QA::Support::Page::Logging do
let(:page) { double.as_null_object }
before do
diff --git a/qa/spec/page/validator_spec.rb b/qa/spec/page/validator_spec.rb
index c727cfb686e..cfb36052294 100644
--- a/qa/spec/page/validator_spec.rb
+++ b/qa/spec/page/validator_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Page::Validator do
+RSpec.describe QA::Page::Validator do
describe '#constants' do
subject do
described_class.new(QA::Page::Project)
diff --git a/qa/spec/page/view_spec.rb b/qa/spec/page/view_spec.rb
index 3cb64dcd9c2..3342b387ed1 100644
--- a/qa/spec/page/view_spec.rb
+++ b/qa/spec/page/view_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Page::View do
+RSpec.describe QA::Page::View do
let(:element) do
double('element', name: :something, pattern: /some element/)
end
diff --git a/qa/spec/resource/api_fabricator_spec.rb b/qa/spec/resource/api_fabricator_spec.rb
index eb2bdd1be64..69a95c92332 100644
--- a/qa/spec/resource/api_fabricator_spec.rb
+++ b/qa/spec/resource/api_fabricator_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Resource::ApiFabricator do
+RSpec.describe QA::Resource::ApiFabricator do
let(:resource_without_api_support) do
Class.new do
def self.name
diff --git a/qa/spec/resource/base_spec.rb b/qa/spec/resource/base_spec.rb
index b23de19e1f8..c0bedf794be 100644
--- a/qa/spec/resource/base_spec.rb
+++ b/qa/spec/resource/base_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Resource::Base do
+RSpec.describe QA::Resource::Base do
include Helpers::StubENV
let(:resource) { spy('resource') }
diff --git a/qa/spec/resource/events/base_spec.rb b/qa/spec/resource/events/base_spec.rb
index 9cdf4785092..4df30a970fc 100644
--- a/qa/spec/resource/events/base_spec.rb
+++ b/qa/spec/resource/events/base_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Resource::Events::Base do
+RSpec.describe QA::Resource::Events::Base do
let(:resource) do
Class.new(QA::Resource::Base) do
def api_get_path
diff --git a/qa/spec/resource/events/project_spec.rb b/qa/spec/resource/events/project_spec.rb
index 98da87906fa..88d50749a0a 100644
--- a/qa/spec/resource/events/project_spec.rb
+++ b/qa/spec/resource/events/project_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Resource::Events::Project do
+RSpec.describe QA::Resource::Events::Project do
let(:resource) do
Class.new(QA::Resource::Base) do
def api_get_path
diff --git a/qa/spec/resource/repository/push_spec.rb b/qa/spec/resource/repository/push_spec.rb
index 2f9e4958ae1..2b9c90b3dac 100644
--- a/qa/spec/resource/repository/push_spec.rb
+++ b/qa/spec/resource/repository/push_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Resource::Repository::Push do
+RSpec.describe QA::Resource::Repository::Push do
describe '.files=' do
let(:files) do
[
diff --git a/qa/spec/resource/ssh_key_spec.rb b/qa/spec/resource/ssh_key_spec.rb
index b2b5ec070e1..fd0fda3c1b8 100644
--- a/qa/spec/resource/ssh_key_spec.rb
+++ b/qa/spec/resource/ssh_key_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Resource::SSHKey do
+RSpec.describe QA::Resource::SSHKey do
describe '#key' do
it 'generates a default key' do
expect(subject.key).to be_a(QA::Runtime::Key::RSA)
diff --git a/qa/spec/resource/user_spec.rb b/qa/spec/resource/user_spec.rb
index 5845f7996a3..e7397d9c0bf 100644
--- a/qa/spec/resource/user_spec.rb
+++ b/qa/spec/resource/user_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Resource::User do
+RSpec.describe QA::Resource::User do
let(:api_resource) do
{
name: "GitLab QA",
diff --git a/qa/spec/runtime/api/client_spec.rb b/qa/spec/runtime/api/client_spec.rb
index 6f7020d6595..dd139fda980 100644
--- a/qa/spec/runtime/api/client_spec.rb
+++ b/qa/spec/runtime/api/client_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::API::Client do
+RSpec.describe QA::Runtime::API::Client do
include Helpers::StubENV
describe 'initialization' do
diff --git a/qa/spec/runtime/api/request_spec.rb b/qa/spec/runtime/api/request_spec.rb
index 8354eff6234..93de2f4a87e 100644
--- a/qa/spec/runtime/api/request_spec.rb
+++ b/qa/spec/runtime/api/request_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::API::Request do
+RSpec.describe QA::Runtime::API::Request do
let(:client) { QA::Runtime::API::Client.new('http://example.com') }
let(:request) { described_class.new(client, '/users') }
diff --git a/qa/spec/runtime/application_settings_spec.rb b/qa/spec/runtime/application_settings_spec.rb
index e48214b22e6..5c4947f6f70 100644
--- a/qa/spec/runtime/application_settings_spec.rb
+++ b/qa/spec/runtime/application_settings_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::ApplicationSettings do
+RSpec.describe QA::Runtime::ApplicationSettings do
let(:api_client) { double('QA::Runtime::API::Client') }
let(:request) { Struct.new(:url).new('http://api') }
let(:get_response) { Struct.new(:body).new("{}") }
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb
index 0cfb9a70c88..bf6c01bf251 100644
--- a/qa/spec/runtime/env_spec.rb
+++ b/qa/spec/runtime/env_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::Env do
+RSpec.describe QA::Runtime::Env do
include Helpers::StubENV
shared_examples 'boolean method' do |**kwargs|
diff --git a/qa/spec/runtime/feature_spec.rb b/qa/spec/runtime/feature_spec.rb
index db3c2f65963..d43033e3770 100644
--- a/qa/spec/runtime/feature_spec.rb
+++ b/qa/spec/runtime/feature_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::Feature do
+RSpec.describe QA::Runtime::Feature do
let(:api_client) { double('QA::Runtime::API::Client') }
let(:request) { Struct.new(:url).new('http://api') }
let(:response_post) { Struct.new(:code).new(201) }
diff --git a/qa/spec/runtime/key/ecdsa_spec.rb b/qa/spec/runtime/key/ecdsa_spec.rb
index 3f9718e62c5..499233df618 100644
--- a/qa/spec/runtime/key/ecdsa_spec.rb
+++ b/qa/spec/runtime/key/ecdsa_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::Key::ECDSA do
+RSpec.describe QA::Runtime::Key::ECDSA do
describe '#public_key' do
[256, 384, 521].each do |bits|
it "generates a public #{bits}-bits ECDSA key" do
diff --git a/qa/spec/runtime/key/ed25519_spec.rb b/qa/spec/runtime/key/ed25519_spec.rb
index 08f232260af..e63c7f5deae 100644
--- a/qa/spec/runtime/key/ed25519_spec.rb
+++ b/qa/spec/runtime/key/ed25519_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::Key::ED25519 do
+RSpec.describe QA::Runtime::Key::ED25519 do
describe '#public_key' do
subject { described_class.new.public_key }
diff --git a/qa/spec/runtime/key/rsa_spec.rb b/qa/spec/runtime/key/rsa_spec.rb
index fcb52f541bf..5b5d8a13fa1 100644
--- a/qa/spec/runtime/key/rsa_spec.rb
+++ b/qa/spec/runtime/key/rsa_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::Key::RSA do
+RSpec.describe QA::Runtime::Key::RSA do
describe '#public_key' do
subject { described_class.new.public_key }
diff --git a/qa/spec/runtime/logger_spec.rb b/qa/spec/runtime/logger_spec.rb
index 44be3381bff..a888bf1452b 100644
--- a/qa/spec/runtime/logger_spec.rb
+++ b/qa/spec/runtime/logger_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::Logger do
+RSpec.describe QA::Runtime::Logger do
before do
logger = Logger.new $stdout
logger.level = ::Logger::DEBUG
diff --git a/qa/spec/runtime/namespace_spec.rb b/qa/spec/runtime/namespace_spec.rb
index d24fa509f30..92836862864 100644
--- a/qa/spec/runtime/namespace_spec.rb
+++ b/qa/spec/runtime/namespace_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::Namespace do
+RSpec.describe QA::Runtime::Namespace do
include Helpers::StubENV
describe '.name' do
diff --git a/qa/spec/runtime/release_spec.rb b/qa/spec/runtime/release_spec.rb
index b5a7dd5269d..b4e278fb546 100644
--- a/qa/spec/runtime/release_spec.rb
+++ b/qa/spec/runtime/release_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::Release do
+RSpec.describe QA::Runtime::Release do
context 'when release version has extension strategy' do
let(:strategy) { spy('strategy') }
diff --git a/qa/spec/runtime/scenario_spec.rb b/qa/spec/runtime/scenario_spec.rb
index 30ada4529ed..175973b6795 100644
--- a/qa/spec/runtime/scenario_spec.rb
+++ b/qa/spec/runtime/scenario_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Runtime::Scenario do
+RSpec.describe QA::Runtime::Scenario do
subject do
Module.new.extend(described_class)
end
diff --git a/qa/spec/scenario/actable_spec.rb b/qa/spec/scenario/actable_spec.rb
index 589d0c61993..36e9f3de961 100644
--- a/qa/spec/scenario/actable_spec.rb
+++ b/qa/spec/scenario/actable_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Actable do
+RSpec.describe QA::Scenario::Actable do
subject do
Class.new do
include QA::Scenario::Actable
diff --git a/qa/spec/scenario/bootable_spec.rb b/qa/spec/scenario/bootable_spec.rb
index e8accb45518..8a96e9bebbf 100644
--- a/qa/spec/scenario/bootable_spec.rb
+++ b/qa/spec/scenario/bootable_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Bootable do
+RSpec.describe QA::Scenario::Bootable do
subject do
Class.new(QA::Scenario::Template)
.include(described_class)
diff --git a/qa/spec/scenario/template_spec.rb b/qa/spec/scenario/template_spec.rb
index 65793734548..f07d817ea16 100644
--- a/qa/spec/scenario/template_spec.rb
+++ b/qa/spec/scenario/template_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Template do
+RSpec.describe QA::Scenario::Template do
let(:feature) { spy('Runtime::Feature') }
let(:release) { spy('Runtime::Release') }
diff --git a/qa/spec/scenario/test/instance/airgapped_spec.rb b/qa/spec/scenario/test/instance/airgapped_spec.rb
index 0c4167eafff..5e319ba4bbb 100644
--- a/qa/spec/scenario/test/instance/airgapped_spec.rb
+++ b/qa/spec/scenario/test/instance/airgapped_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Instance::Airgapped do
+RSpec.describe QA::Scenario::Test::Instance::Airgapped do
describe '#perform' do
it_behaves_like 'a QA scenario class' do
end
diff --git a/qa/spec/scenario/test/instance/all_spec.rb b/qa/spec/scenario/test/instance/all_spec.rb
index 8acd56914c5..875df9a32f5 100644
--- a/qa/spec/scenario/test/instance/all_spec.rb
+++ b/qa/spec/scenario/test/instance/all_spec.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Instance::All do
+RSpec.describe QA::Scenario::Test::Instance::All do
it_behaves_like 'a QA scenario class'
end
diff --git a/qa/spec/scenario/test/instance/smoke_spec.rb b/qa/spec/scenario/test/instance/smoke_spec.rb
index 6cc71699be9..09d0df2c479 100644
--- a/qa/spec/scenario/test/instance/smoke_spec.rb
+++ b/qa/spec/scenario/test/instance/smoke_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Instance::Smoke do
+RSpec.describe QA::Scenario::Test::Instance::Smoke do
it_behaves_like 'a QA scenario class' do
let(:tags) { [:smoke] }
end
diff --git a/qa/spec/scenario/test/integration/github_spec.rb b/qa/spec/scenario/test/integration/github_spec.rb
index b2d577bd552..b68b06a7b9f 100644
--- a/qa/spec/scenario/test/integration/github_spec.rb
+++ b/qa/spec/scenario/test/integration/github_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Integration::Github do
+RSpec.describe QA::Scenario::Test::Integration::Github do
describe '#perform' do
let(:env) { spy('Runtime::Env') }
diff --git a/qa/spec/scenario/test/integration/instance_saml_spec.rb b/qa/spec/scenario/test/integration/instance_saml_spec.rb
index 15f15b2e643..20e860d3e4b 100644
--- a/qa/spec/scenario/test/integration/instance_saml_spec.rb
+++ b/qa/spec/scenario/test/integration/instance_saml_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Integration::InstanceSAML do
+RSpec.describe QA::Scenario::Test::Integration::InstanceSAML do
describe '#perform' do
it_behaves_like 'a QA scenario class' do
let(:tags) { [:instance_saml] }
diff --git a/qa/spec/scenario/test/integration/kubernetes_spec.rb b/qa/spec/scenario/test/integration/kubernetes_spec.rb
index 51ee7b9acff..d5885b97343 100644
--- a/qa/spec/scenario/test/integration/kubernetes_spec.rb
+++ b/qa/spec/scenario/test/integration/kubernetes_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Integration::Kubernetes do
+RSpec.describe QA::Scenario::Test::Integration::Kubernetes do
describe '#perform' do
it_behaves_like 'a QA scenario class' do
let(:tags) { [:kubernetes] }
diff --git a/qa/spec/scenario/test/integration/ldap_spec.rb b/qa/spec/scenario/test/integration/ldap_spec.rb
index c493cde6c7a..c53302d9bd3 100644
--- a/qa/spec/scenario/test/integration/ldap_spec.rb
+++ b/qa/spec/scenario/test/integration/ldap_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Integration::LDAPNoTLS do
+RSpec.describe QA::Scenario::Test::Integration::LDAPNoTLS do
describe '#perform' do
it_behaves_like 'a QA scenario class' do
let(:tags) { [:ldap_no_tls] }
@@ -8,7 +8,7 @@ describe QA::Scenario::Test::Integration::LDAPNoTLS do
end
end
-describe QA::Scenario::Test::Integration::LDAPNoServer do
+RSpec.describe QA::Scenario::Test::Integration::LDAPNoServer do
describe '#perform' do
it_behaves_like 'a QA scenario class' do
let(:tags) { [:ldap_no_server] }
@@ -16,7 +16,7 @@ describe QA::Scenario::Test::Integration::LDAPNoServer do
end
end
-describe QA::Scenario::Test::Integration::LDAPTLS do
+RSpec.describe QA::Scenario::Test::Integration::LDAPTLS do
describe '#perform' do
it_behaves_like 'a QA scenario class' do
let(:tags) { [:ldap_tls] }
diff --git a/qa/spec/scenario/test/integration/mattermost_spec.rb b/qa/spec/scenario/test/integration/mattermost_spec.rb
index 7e4eb6284e8..9532ec35b95 100644
--- a/qa/spec/scenario/test/integration/mattermost_spec.rb
+++ b/qa/spec/scenario/test/integration/mattermost_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Integration::Mattermost do
+RSpec.describe QA::Scenario::Test::Integration::Mattermost do
describe '#perform' do
it_behaves_like 'a QA scenario class' do
let(:args) { %w[gitlab_address mattermost_address] }
diff --git a/qa/spec/scenario/test/integration/object_storage_spec.rb b/qa/spec/scenario/test/integration/object_storage_spec.rb
index 8b4367bee32..235dd495687 100644
--- a/qa/spec/scenario/test/integration/object_storage_spec.rb
+++ b/qa/spec/scenario/test/integration/object_storage_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Integration::ObjectStorage do
+RSpec.describe QA::Scenario::Test::Integration::ObjectStorage do
describe '#perform' do
it_behaves_like 'a QA scenario class' do
let(:tags) { [:object_storage] }
diff --git a/qa/spec/scenario/test/sanity/framework_spec.rb b/qa/spec/scenario/test/sanity/framework_spec.rb
index a63c59e2995..5ae8b123ec2 100644
--- a/qa/spec/scenario/test/sanity/framework_spec.rb
+++ b/qa/spec/scenario/test/sanity/framework_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Sanity::Framework do
+RSpec.describe QA::Scenario::Test::Sanity::Framework do
it_behaves_like 'a QA scenario class' do
let(:tags) { [:framework] }
end
diff --git a/qa/spec/scenario/test/sanity/selectors_spec.rb b/qa/spec/scenario/test/sanity/selectors_spec.rb
index e18babaed63..2a68dd23219 100644
--- a/qa/spec/scenario/test/sanity/selectors_spec.rb
+++ b/qa/spec/scenario/test/sanity/selectors_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Scenario::Test::Sanity::Selectors do
+RSpec.describe QA::Scenario::Test::Sanity::Selectors do
let(:validator) { spy('validator') }
before do
diff --git a/qa/spec/specs/helpers/quarantine_spec.rb b/qa/spec/specs/helpers/quarantine_spec.rb
index 9686a9771c4..b0b7d4e6804 100644
--- a/qa/spec/specs/helpers/quarantine_spec.rb
+++ b/qa/spec/specs/helpers/quarantine_spec.rb
@@ -36,7 +36,7 @@ RSpec.configure do |c|
end
end
-describe QA::Specs::Helpers::Quarantine do
+RSpec.describe QA::Specs::Helpers::Quarantine do
describe '.skip_or_run_quarantined_contexts' do
context 'with no tag focused' do
before do
diff --git a/qa/spec/specs/parallel_runner_spec.rb b/qa/spec/specs/parallel_runner_spec.rb
index 67d94a1f648..c2d28bf81fb 100644
--- a/qa/spec/specs/parallel_runner_spec.rb
+++ b/qa/spec/specs/parallel_runner_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Specs::ParallelRunner do
+RSpec.describe QA::Specs::ParallelRunner do
include Helpers::StubENV
before do
diff --git a/qa/spec/specs/runner_spec.rb b/qa/spec/specs/runner_spec.rb
index 361588fa14f..8171cfcb3e6 100644
--- a/qa/spec/specs/runner_spec.rb
+++ b/qa/spec/specs/runner_spec.rb
@@ -2,7 +2,7 @@
require 'active_support/core_ext/hash'
-describe QA::Specs::Runner do
+RSpec.describe QA::Specs::Runner do
shared_examples 'excludes orchestrated' do
it 'excludes the orchestrated tag and includes default args' do
expect_rspec_runner_arguments(['--tag', '~orchestrated', *described_class::DEFAULT_TEST_PATH_ARGS])
diff --git a/qa/spec/support/repeater_spec.rb b/qa/spec/support/repeater_spec.rb
index b5d5058ef49..18ccbf250cb 100644
--- a/qa/spec/support/repeater_spec.rb
+++ b/qa/spec/support/repeater_spec.rb
@@ -4,7 +4,7 @@ require 'logger'
require 'timecop'
require 'active_support/core_ext/integer/time'
-describe QA::Support::Repeater do
+RSpec.describe QA::Support::Repeater do
before do
logger = ::Logger.new $stdout
logger.level = ::Logger::DEBUG
diff --git a/qa/spec/support/retrier_spec.rb b/qa/spec/support/retrier_spec.rb
index ef1d53e6b65..6f052519516 100644
--- a/qa/spec/support/retrier_spec.rb
+++ b/qa/spec/support/retrier_spec.rb
@@ -3,7 +3,7 @@
require 'logger'
require 'timecop'
-describe QA::Support::Retrier do
+RSpec.describe QA::Support::Retrier do
before do
logger = ::Logger.new $stdout
logger.level = ::Logger::DEBUG
diff --git a/qa/spec/support/wait_for_requests_spec.rb b/qa/spec/support/wait_for_requests_spec.rb
index 26c4951d198..47c35addd9f 100644
--- a/qa/spec/support/wait_for_requests_spec.rb
+++ b/qa/spec/support/wait_for_requests_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-describe QA::Support::WaitForRequests do
+RSpec.describe QA::Support::WaitForRequests do
describe '.wait_for_requests' do
before do
allow(subject).to receive(:finished_all_ajax_requests?).and_return(true)
diff --git a/qa/spec/support/waiter_spec.rb b/qa/spec/support/waiter_spec.rb
index 35f1e01289a..5b0c2c95d0d 100644
--- a/qa/spec/support/waiter_spec.rb
+++ b/qa/spec/support/waiter_spec.rb
@@ -2,7 +2,7 @@
require 'logger'
-describe QA::Support::Waiter do
+RSpec.describe QA::Support::Waiter do
before do
logger = ::Logger.new $stdout
logger.level = ::Logger::DEBUG
diff --git a/spec/factories/terraform/state_version.rb b/spec/factories/terraform/state_version.rb
index d1bd78215e3..b45bd01fd3c 100644
--- a/spec/factories/terraform/state_version.rb
+++ b/spec/factories/terraform/state_version.rb
@@ -7,5 +7,13 @@ FactoryBot.define do
sequence(:version)
file { fixture_file_upload('spec/fixtures/terraform/terraform.tfstate', 'application/json') }
+
+ trait(:checksummed) do
+ verification_checksum { 'abc' }
+ end
+
+ trait(:checksum_failure) do
+ verification_failure { 'Could not calculate the checksum' }
+ end
end
end
diff --git a/spec/models/terraform/state_spec.rb b/spec/models/terraform/state_spec.rb
index 01ae80a61d1..5c3958da7bf 100644
--- a/spec/models/terraform/state_spec.rb
+++ b/spec/models/terraform/state_spec.rb
@@ -15,7 +15,7 @@ RSpec.describe Terraform::State do
it { is_expected.to validate_presence_of(:project_id) }
before do
- stub_terraform_state_object_storage(Terraform::StateUploader)
+ stub_terraform_state_object_storage
end
describe '#file' do
@@ -43,7 +43,7 @@ RSpec.describe Terraform::State do
context 'when file is stored locally' do
before do
- stub_terraform_state_object_storage(Terraform::StateUploader, enabled: false)
+ stub_terraform_state_object_storage(enabled: false)
end
it_behaves_like 'mounted file in local store'
diff --git a/spec/models/terraform/state_version_spec.rb b/spec/models/terraform/state_version_spec.rb
index 72dd29e1571..cc5ea87159d 100644
--- a/spec/models/terraform/state_version_spec.rb
+++ b/spec/models/terraform/state_version_spec.rb
@@ -29,7 +29,7 @@ RSpec.describe Terraform::StateVersion do
subject { create(:terraform_state_version) }
before do
- stub_terraform_state_object_storage(Terraform::StateUploader)
+ stub_terraform_state_object_storage
end
describe '#file' do
diff --git a/spec/requests/api/terraform/state_spec.rb b/spec/requests/api/terraform/state_spec.rb
index 8d128bd911f..aff41ff5974 100644
--- a/spec/requests/api/terraform/state_spec.rb
+++ b/spec/requests/api/terraform/state_spec.rb
@@ -18,7 +18,7 @@ RSpec.describe API::Terraform::State do
let(:state_path) { "/projects/#{project_id}/terraform/state/#{state_name}" }
before do
- stub_terraform_state_object_storage(Terraform::StateUploader)
+ stub_terraform_state_object_storage
end
describe 'GET /projects/:id/terraform/state/:name' do
diff --git a/spec/support/helpers/stub_object_storage.rb b/spec/support/helpers/stub_object_storage.rb
index 60b320e5af0..dba3d2b137e 100644
--- a/spec/support/helpers/stub_object_storage.rb
+++ b/spec/support/helpers/stub_object_storage.rb
@@ -82,9 +82,16 @@ module StubObjectStorage
**params)
end
- def stub_terraform_state_object_storage(uploader = described_class, **params)
+ def stub_terraform_state_object_storage(**params)
stub_object_storage_uploader(config: Gitlab.config.terraform_state.object_store,
- uploader: uploader,
+ uploader: Terraform::VersionedStateUploader,
+ remote_directory: 'terraform',
+ **params)
+ end
+
+ def stub_terraform_state_version_object_storage(**params)
+ stub_object_storage_uploader(config: Gitlab.config.terraform_state.object_store,
+ uploader: Terraform::StateUploader,
remote_directory: 'terraform',
**params)
end