Commit 0a480e3c authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'frozen_string_spec_models' into 'master'

Add # frozen_string_literal to spec/models

See merge request gitlab-org/gitlab-ce!26791
parents b8118a65 ab2047d0
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ability do describe Ability do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe AbuseReport do describe AbuseReport do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
RSpec.describe ActiveSession, :clean_gitlab_redis_shared_state do RSpec.describe ActiveSession, :clean_gitlab_redis_shared_state do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Appearance do describe Appearance do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ApplicationSetting::Term do describe ApplicationSetting::Term do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ApplicationSetting do describe ApplicationSetting do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe AwardEmoji do describe AwardEmoji do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Badge do describe Badge do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe GroupBadge do describe GroupBadge do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ProjectBadge do describe ProjectBadge do
......
# encoding: utf-8 # encoding: utf-8
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Blob do describe Blob do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::Base do describe BlobViewer::Base do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::Changelog do describe BlobViewer::Changelog do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::ComposerJson do describe BlobViewer::ComposerJson do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::Gemspec do describe BlobViewer::Gemspec do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::GitlabCiYml do describe BlobViewer::GitlabCiYml do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::License do describe BlobViewer::License do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::PackageJson do describe BlobViewer::PackageJson do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::PodspecJson do describe BlobViewer::PodspecJson do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::Podspec do describe BlobViewer::Podspec do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::Readme do describe BlobViewer::Readme do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::RouteMap do describe BlobViewer::RouteMap do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobViewer::ServerSide do describe BlobViewer::ServerSide do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Board do describe Board do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BroadcastMessage do describe BroadcastMessage do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ChatName do describe ChatName do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ChatTeam do describe ChatTeam do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::ArtifactBlob do describe Ci::ArtifactBlob do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::Bridge do describe Ci::Bridge do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::BuildMetadata do describe Ci::BuildMetadata do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::BuildRunnerSession, model: true do describe Ci::BuildRunnerSession, model: true do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::Build do describe Ci::Build do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::BuildTraceChunks::Database do describe Ci::BuildTraceChunks::Database do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::BuildTraceChunks::Fog do describe Ci::BuildTraceChunks::Fog do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::BuildTraceChunks::Redis, :clean_gitlab_redis_shared_state do describe Ci::BuildTraceChunks::Redis, :clean_gitlab_redis_shared_state do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::BuildTraceSectionName, model: true do describe Ci::BuildTraceSectionName, model: true do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::BuildTraceSection, model: true do describe Ci::BuildTraceSection, model: true do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::Group do describe Ci::Group do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::GroupVariable do describe Ci::GroupVariable do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::JobArtifact do describe Ci::JobArtifact do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::LegacyStage do describe Ci::LegacyStage do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::PipelineSchedule do describe Ci::PipelineSchedule do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::PipelineScheduleVariable do describe Ci::PipelineScheduleVariable do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::Pipeline, :mailer do describe Ci::Pipeline, :mailer do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::PipelineVariable do describe Ci::PipelineVariable do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::Runner do describe Ci::Runner do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::Stage, :models do describe Ci::Stage, :models do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::TriggerRequest do describe Ci::TriggerRequest do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::Trigger do describe Ci::Trigger do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Ci::Variable do describe Ci::Variable do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Clusters::Applications::CertManager do describe Clusters::Applications::CertManager do
...@@ -9,7 +11,27 @@ ...@@ -9,7 +11,27 @@
include_examples 'cluster application initial status specs' include_examples 'cluster application initial status specs'
describe '#install_command' do describe '#install_command' do
let(:cluster_issuer_file) { { "cluster_issuer.yaml": "---\napiVersion: certmanager.k8s.io/v1alpha1\nkind: ClusterIssuer\nmetadata:\n name: letsencrypt-prod\nspec:\n acme:\n server: https://acme-v02.api.letsencrypt.org/directory\n email: admin@example.com\n privateKeySecretRef:\n name: letsencrypt-prod\n http01: {}\n" } } let(:cert_email) { 'admin@example.com' }
let(:cluster_issuer_file) do
file_contents = <<~EOF
---
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: #{cert_email}
privateKeySecretRef:
name: letsencrypt-prod
http01: {}
EOF
{ "cluster_issuer.yaml": file_contents }
end
subject { cert_manager.install_command } subject { cert_manager.install_command }
it { is_expected.to be_an_instance_of(Gitlab::Kubernetes::Helm::InstallCommand) } it { is_expected.to be_an_instance_of(Gitlab::Kubernetes::Helm::InstallCommand) }
...@@ -24,9 +46,10 @@ ...@@ -24,9 +46,10 @@
end end
context 'for a specific user' do context 'for a specific user' do
let(:cert_email) { 'abc@xyz.com' }
before do before do
cert_manager.email = 'abc@xyz.com' cert_manager.email = cert_email
cluster_issuer_file[:'cluster_issuer.yaml'].gsub! 'admin@example.com', 'abc@xyz.com'
end end
it 'should use his/her email to register issuer with certificate provider' do it 'should use his/her email to register issuer with certificate provider' do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Clusters::Applications::Helm do describe Clusters::Applications::Helm do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Clusters::Applications::Ingress do describe Clusters::Applications::Ingress do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Clusters::Applications::Jupyter do describe Clusters::Applications::Jupyter do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Clusters::Applications::Knative do describe Clusters::Applications::Knative do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Clusters::Applications::Prometheus do describe Clusters::Applications::Prometheus do
......
# frozen_string_literal: true
require 'rails_helper' require 'rails_helper'
describe Clusters::Applications::Runner do describe Clusters::Applications::Runner do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching do describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Clusters::Project do describe Clusters::Project do
......