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
e031346c
Commit
e031346c
authored
Mar 27, 2020
by
Vladimir Shushlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add service for retrying acme orders
parent
763986e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
app/services/pages_domains/retry_acme_order_service.rb
app/services/pages_domains/retry_acme_order_service.rb
+16
-0
spec/services/pages_domains/retry_acme_order_service_spec.rb
spec/services/pages_domains/retry_acme_order_service_spec.rb
+21
-0
No files found.
app/services/pages_domains/retry_acme_order_service.rb
0 → 100644
View file @
e031346c
# frozen_string_literal: true
module
PagesDomains
class
RetryAcmeOrderService
attr_reader
:pages_domain
def
initialize
(
pages_domain
)
@pages_domain
=
pages_domain
end
def
execute
pages_domain
.
update!
(
auto_ssl_failed:
false
)
PagesDomainSslRenewalWorker
.
perform_async
(
pages_domain
.
id
)
end
end
end
spec/services/pages_domains/retry_acme_order_service_spec.rb
0 → 100644
View file @
e031346c
# frozen_string_literal: true
require
'spec_helper'
describe
PagesDomains
::
RetryAcmeOrderService
do
let
(
:domain
)
{
create
(
:pages_domain
,
auto_ssl_enabled:
true
,
auto_ssl_failed:
true
)
}
let
(
:service
)
{
described_class
.
new
(
domain
)
}
it
'clears auto_ssl_failed'
do
expect
do
service
.
execute
end
.
to
change
{
domain
.
auto_ssl_failed
}.
from
(
true
).
to
(
false
)
end
it
'schedules renewal worker'
do
expect
(
PagesDomainSslRenewalWorker
).
to
receive
(
:perform_async
).
with
(
domain
.
id
).
and_return
(
nil
).
once
service
.
execute
end
end
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