Skip to content
Snippets Groups Projects
Verified Commit f1c77218 authored by Dmitry Gruzd's avatar Dmitry Gruzd :two: Committed by GitLab
Browse files

Merge branch 'ban-ai-never-on-set-experiments' into 'master'

Set Experiments Checkbox to 'false' when 'never_on' is selected in Duo Availability

See merge request !163799



Merged-by: default avatarDmitry Gruzd <dgruzd@gitlab.com>
Approved-by: default avatarJeff Park <jpark@gitlab.com>
Approved-by: default avatarDmitry Gruzd <dgruzd@gitlab.com>
Co-authored-by: default avatarLindsey Shelton <lshelton@gitlab.com>
parents 7dd815e0 e4189cb0
No related branches found
No related tags found
1 merge request!163799Set Experiments Checkbox to 'false' when 'never_on' is selected in Duo Availability
Pipeline #1441438361 passed with warnings
......@@ -537,6 +537,7 @@ def duo_availability=(value)
else
self.duo_features_enabled = false
self.lock_duo_features_enabled = true
self.instance_level_ai_beta_features_enabled = false
end
end
......
......@@ -119,6 +119,7 @@ def duo_availability=(value)
else
self.duo_features_enabled = false
self.lock_duo_features_enabled = true
self.experiment_features_enabled = false
end
end
......
......@@ -202,6 +202,14 @@
expect(setting.lock_duo_features_enabled).to be lock_duo_features_enabled_expectation
end
end
context 'when value is "never_on"' do
it 'disables instance level AI and beta features' do
setting.duo_availability = "never_on"
expect(setting.instance_level_ai_beta_features_enabled).to be false
end
end
end
context 'when validating geo_node_allowed_ips', feature_category: :geo_replication do
......
......@@ -333,6 +333,14 @@
expect(setting.duo_availability).to eq(expectation)
end
end
context 'when value is "never_on"' do
it 'sets experiment_features_enabled to false' do
setting.duo_availability = "never_on"
expect(setting.experiment_features_enabled).to be false
end
end
end
describe '#duo_availability=' do
......
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