diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-30 15:11:08 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-30 15:11:08 +0000 |
commit | 2cba3ab8e7b2d6b32be6910d15b53860f2c2140e (patch) | |
tree | 28bd2516c6030e038bb8ea1143cc6ec11f953fd0 /spec/models/environment_spec.rb | |
parent | a10d237d37e78cbe84f72fffaeff74dc73f1e68f (diff) | |
download | gitlab-ce-2cba3ab8e7b2d6b32be6910d15b53860f2c2140e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r-- | spec/models/environment_spec.rb | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index e021a6cf6d3..759bb080172 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -302,6 +302,8 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do 'testing' | described_class.tiers[:testing] 'testing-prd' | described_class.tiers[:testing] 'acceptance-testing' | described_class.tiers[:testing] + 'production-test' | described_class.tiers[:testing] + 'test-production' | described_class.tiers[:testing] 'QC' | described_class.tiers[:testing] 'gstg' | described_class.tiers[:staging] 'staging' | described_class.tiers[:staging] @@ -315,6 +317,12 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do 'gprd-cny' | described_class.tiers[:production] 'production' | described_class.tiers[:production] 'Production' | described_class.tiers[:production] + 'PRODUCTION' | described_class.tiers[:production] + 'Production/eu' | described_class.tiers[:production] + 'production/eu' | described_class.tiers[:production] + 'PRODUCTION/EU' | described_class.tiers[:production] + 'productioneu' | described_class.tiers[:production] + 'production/www.gitlab.com' | described_class.tiers[:production] 'prod' | described_class.tiers[:production] 'PROD' | described_class.tiers[:production] 'Live' | described_class.tiers[:production] @@ -444,31 +452,6 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do end end - describe '#update_merge_request_metrics?' do - { - 'gprd' => false, - 'prod' => true, - 'prod-test' => false, - 'PROD' => true, - 'production' => true, - 'production-test' => false, - 'PRODUCTION' => true, - 'production/eu' => true, - 'PRODUCTION/EU' => true, - 'production/www.gitlab.com' => true, - 'productioneu' => false, - 'Production' => true, - 'Production/eu' => true, - 'test-production' => false - }.each do |name, expected_value| - it "returns #{expected_value} for #{name}" do - env = create(:environment, name: name) - - expect(env.update_merge_request_metrics?).to eq(expected_value), "Expected the name '#{name}' to result in #{expected_value}, but it didn't." - end - end - end - describe '#environment_type' do subject { environment.environment_type } |