Fixed unit test to not actually run backup command

One unit tests is still trying to execute the actual backup command
instead of the mocked backup command. This is causing an issue on
the Jenkins slave where it is trying to run as sudo (and failing).
Fixed the test to use a mock runner, and not try to run innobackupex.

Change-Id: Ifff7945be158a08167cdd282ed8eb18952224eee
Closes-bug: 1291516
This commit is contained in:
Nikhil Manchanda 2014-03-17 19:20:08 -07:00
parent 679500beaf
commit 19d940516e

View File

@ -369,8 +369,8 @@ class BackupAgentTest(testtools.TestCase):
'parent_checksum': 'md5',
}
when(mysql_impl.InnoBackupExIncremental).metadata().thenReturn(meta)
when(mysql_impl.InnoBackupExIncremental).check_process().thenReturn(
True)
when(mysql_impl.InnoBackupExIncremental).run().thenReturn(True)
when(mysql_impl.InnoBackupExIncremental).__exit__().thenReturn(True)
agent = backupagent.BackupAgent()