Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
51e2a823
Commit
51e2a823
authored
Mar 27, 2020
by
Vladimir Shushlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add retry_auto_ssl action to pages domains controller
parent
e031346c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
app/controllers/projects/pages_domains_controller.rb
app/controllers/projects/pages_domains_controller.rb
+6
-0
config/routes/project.rb
config/routes/project.rb
+1
-0
spec/controllers/projects/pages_domains_controller_spec.rb
spec/controllers/projects/pages_domains_controller_spec.rb
+18
-0
No files found.
app/controllers/projects/pages_domains_controller.rb
View file @
51e2a823
...
...
@@ -26,6 +26,12 @@ class Projects::PagesDomainsController < Projects::ApplicationController
redirect_to
project_pages_domain_path
(
@project
,
@domain
)
end
def
retry_auto_ssl
PagesDomains
::
RetryAcmeOrderService
.
new
(
@domain
).
execute
redirect_to
project_pages_domain_path
(
@project
,
@domain
)
end
def
edit
redirect_to
project_pages_domain_path
(
@project
,
@domain
)
end
...
...
config/routes/project.rb
View file @
51e2a823
...
...
@@ -338,6 +338,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resources
:domains
,
except: :index
,
controller:
'pages_domains'
,
constraints:
{
id:
%r{[^/]+}
}
do
member
do
post
:verify
post
:retry_auto_ssl
delete
:clean_certificate
end
end
...
...
spec/controllers/projects/pages_domains_controller_spec.rb
View file @
51e2a823
...
...
@@ -181,6 +181,24 @@ describe Projects::PagesDomainsController do
end
end
describe
'POST retry_auto_ssl'
do
before
do
pages_domain
.
update!
(
auto_ssl_enabled:
true
,
auto_ssl_failed:
true
)
end
let
(
:params
)
{
request_params
.
merge
(
id:
pages_domain
.
domain
)
}
it
'calls retry service and redirects'
do
expect_next_instance_of
(
PagesDomains
::
RetryAcmeOrderService
,
pages_domain
)
do
|
service
|
expect
(
service
).
to
receive
(
:execute
)
end
post
:retry_auto_ssl
,
params:
params
expect
(
response
).
to
redirect_to
project_pages_domain_path
(
project
,
pages_domain
)
end
end
describe
'DELETE destroy'
do
it
"deletes the pages domain"
do
expect
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment