Commit 81584248 authored by Stan Hu's avatar Stan Hu

Use uncached settings to verify admin settings took

In the specs, we don't actually check the values shown in the UI, but
directly check the backend data. We need to look at the uncached values
since the cached values expire after a minute.
parent 6dbfad9e
......@@ -19,8 +19,8 @@ describe 'Admin updates EE-only settings' do
click_button 'Save changes'
end
expect(Gitlab::CurrentSettings.geo_status_timeout).to eq(15)
expect(Gitlab::CurrentSettings.geo_node_allowed_ips).to eq('192.34.34.34')
expect(current_settings.geo_status_timeout).to eq(15)
expect(current_settings.geo_node_allowed_ips).to eq('192.34.34.34')
expect(page).to have_content "Application settings saved successfully"
end
end
......@@ -63,10 +63,10 @@ describe 'Admin updates EE-only settings' do
end
aggregate_failures do
expect(Gitlab::CurrentSettings.elasticsearch_indexing).to be_truthy
expect(Gitlab::CurrentSettings.elasticsearch_search).to be_truthy
expect(Gitlab::CurrentSettings.elasticsearch_shards).to eq(120)
expect(Gitlab::CurrentSettings.elasticsearch_replicas).to eq(2)
expect(current_settings.elasticsearch_indexing).to be_truthy
expect(current_settings.elasticsearch_search).to be_truthy
expect(current_settings.elasticsearch_shards).to eq(120)
expect(current_settings.elasticsearch_replicas).to eq(2)
expect(page).to have_content "Application settings saved successfully"
end
end
......@@ -111,7 +111,7 @@ describe 'Admin updates EE-only settings' do
wait_for_all_requests
expect(Gitlab::CurrentSettings.elasticsearch_limit_indexing).to be_truthy
expect(current_settings.elasticsearch_limit_indexing).to be_truthy
expect(ElasticsearchIndexedNamespace.exists?(namespace_id: namespace.id)).to be_truthy
expect(ElasticsearchIndexedProject.exists?(project_id: project.id)).to be_truthy
expect(page).to have_content "Application settings saved successfully"
......@@ -204,4 +204,8 @@ describe 'Admin updates EE-only settings' do
end
end
end
def current_settings
ApplicationSetting.current_without_cache
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment