-
Notifications
You must be signed in to change notification settings - Fork 510
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
Restoring from file should be repeatable. #8780
Conversation
1358ef8
to
1bee030
Compare
api/backups/restore_test.go
Outdated
mockBackupFacadeCaller.EXPECT().FacadeCall("List", args, resultBackupList).SetArg(2, testBackupsListResults), | ||
mockBackupFacadeCaller.EXPECT().FacadeCall("Restore", gomock.Any(), gomock.Any()), | ||
mockBackupFacadeCaller.EXPECT().FacadeCall("FinishRestore", gomock.Any(), gomock.Any()), | ||
) |
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.
Notice here how we do not make a call to Upload. Any call to upload would break this test. Making an interface for the client and explicitly saying mockBackupClient.EXPECT().Upload(arg).Times(0)
would of course be much better.
d87c8e4
to
06018f8
Compare
06018f8
to
cc07d2d
Compare
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.
LGTM
|
1 similar comment
|
Description of change
Restoring a backup from file twice in success fails. Juju should be able to restore a given backup from file more than once.
Why is this change needed?
This change fixes the referenced bug.
How do we verify that the change works?
Documentation changes
N/A
Bug reference
https://bugs.launchpad.net/juju/+bug/1771980