Skip to content
Snippets Groups Projects
Commit 0bce4a1bc7c7 authored by Balasankar "Balu" C's avatar Balasankar "Balu" C
Browse files

Add back Pages local store tests


Signed-off-by: default avatarBalasankar "Balu" C <balasankar@gitlab.com>
parent 9a2f66849b93
No related branches found
No related tags found
3 merge requests!51Validate shift of Heptapod 0.25 to oldstable series,!47Making Heptapod 0.25 the new stable in Omnibus,!45GitLab 14.2
......@@ -154,6 +154,55 @@
end
end
end
describe 'Pages local store settings' do
context 'when neither Pages path nor local store path is specified' do
before do
stub_gitlab_rb(
external_url: 'https://gitlab.example.com',
pages_external_url: 'https://pages.example.com'
)
end
it 'renders gitlab.yml with Pages local store path set to default Pages path' do
expect(gitlab_yml[:production][:pages][:local_store][:path]).to eq('/var/opt/gitlab/gitlab-rails/shared/pages')
end
end
context 'when Pages path is specified but not local store path' do
before do
stub_gitlab_rb(
external_url: 'https://gitlab.example.com',
pages_external_url: 'https://pages.example.com',
gitlab_rails: {
pages_local_store_enabled: true,
pages_path: '/tmp/test'
}
)
end
it 'renders gitlab.yml with Pages local store path set to Pages path' do
expect(gitlab_yml[:production][:pages][:local_store][:path]).to eq('/tmp/test')
end
end
context 'when Pages local store path is different than Pages path' do
before do
stub_gitlab_rb(
external_url: 'https://gitlab.example.com',
pages_external_url: 'https://pages.example.com',
gitlab_rails: {
pages_path: '/tmp/test',
pages_local_store_path: '/another/path'
}
)
end
it 'renders gitlab.yml with specified Pages local store path' do
expect(gitlab_yml[:production][:pages][:local_store][:path]).to eq('/another/path')
end
end
end
end
end
end
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