-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schedule Heroku Backups and Capture backup of existing staging database for Review Apps #826
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
38a43c6
Capture backup of existing staging database
toobulkeh 5bc638b
Added #set_heroku_backup_schedule
toobulkeh dd5c6eb
Added backup schedule to creation of Heroku apps
toobulkeh 8e24ede
Delegated backup schedule to Heroku Adapter
toobulkeh f450fc4
Add test for Heroku Backup Schedule
toobulkeh a6f738f
Update heroku.rb
toobulkeh c390673
Update heroku_spec.rb
toobulkeh 0d95786
Update heroku_spec.rb
toobulkeh 9115755
Update heroku.rb
toobulkeh 930a31b
Update heroku_spec.rb
toobulkeh 2883dd9
Update README.md
toobulkeh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,16 @@ module Adapters | |
) | ||
end | ||
|
||
it "sets the heroku backup schedule" do | ||
app_builder = double(app_name: app_name) | ||
allow(app_builder).to receive(:run) | ||
|
||
Heroku.new(app_builder).set_heroku_backup_schedule | ||
|
||
expect(app_builder).to have_backup_schedule("staging") | ||
expect(app_builder).to have_backup_schedule("production") | ||
end | ||
|
||
it "sets the application host" do | ||
app_builder = double(app_name: app_name) | ||
allow(app_builder).to receive(:run) | ||
|
@@ -49,6 +59,11 @@ def app_name | |
SuspendersTestHelpers::APP_NAME | ||
end | ||
|
||
def have_backup_schedule(remote_name) | ||
have_received(:run). | ||
with(/pg:backups:schedule DATABASE_URL --at '02:00 America\/Los_Angeles' --remote #{remote_name}/) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [108/80] |
||
end | ||
|
||
def have_configured_var(remote_name, var) | ||
have_received(:run).with(/config:add #{var}=.+ --remote #{remote_name}/) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [108/80]