-
Notifications
You must be signed in to change notification settings - Fork 4
[LIB-757] - Add possibility to restore instance from backup via Python lib #214
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
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1a80368
[LIB-757] - add possibility to restore backups
ilu2112 cf361ba
[LIB-757] - remove obsolete blank lines
ilu2112 3a1d0b6
[LIB-757] - test
ilu2112 5d8a1ce
[LIB-757] - improve test
ilu2112 4a62a9a
[LIB-757] - make backup restore synchronous
ilu2112 d84be9d
[LIB-757] - Remove unused imports.
ilu2112 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
[LIB-757] - make backup restore synchronous
- Loading branch information
commit 4a62a9a45b366e85bc47b44ee7d3e4e90710e2ef
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -45,12 +45,12 @@ def _test_backup_restore(self, backup_id): | |
| 'There should be only 1 more instance class after new class creation.' | ||
| ) | ||
|
|
||
| # wait for backup to be truly saved and restored | ||
| # wait for backup to be saved | ||
| while backup.status != 'success': | ||
|
Contributor
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. If something will fail - we will never end the tests :) So the check here - is that restore is created and running - the whole logic is checked on CORE test no need to repeat that. |
||
| time.sleep(1) | ||
| backup.reload() | ||
|
|
||
| backup.restore() | ||
| time.sleep(15) | ||
|
|
||
| instance.reload() | ||
| classes_count_after_restore = len(list(instance.classes)) | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
This is also problematic - when you rework this - just return the Restore object and leave reload (for the status update) to the user - or provide method is_success - which will ask for the status by API (in other words: will do reload of the status field -> object).