Skip to content
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

Merged
merged 2 commits into from
May 31, 2018

Conversation

ExternalReality
Copy link
Contributor

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?

  1. Create a backup to file.
  2. Restore the backup.
  3. Restore the backup.

Documentation changes

N/A

Bug reference

https://bugs.launchpad.net/juju/+bug/1771980

@ExternalReality
Copy link
Contributor Author

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()),
)
Copy link
Contributor Author

@ExternalReality ExternalReality May 30, 2018

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.

@ExternalReality ExternalReality force-pushed the bug#1771980 branch 3 times, most recently from d87c8e4 to 06018f8 Compare May 31, 2018 10:41
Copy link
Member

@jameinel jameinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ExternalReality
Copy link
Contributor Author

$$MERGE$$

1 similar comment
@ExternalReality
Copy link
Contributor Author

$$MERGE$$

@jujubot jujubot merged commit e114fc4 into juju:develop May 31, 2018
@ExternalReality ExternalReality deleted the bug#1771980 branch May 31, 2018 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants