From 19d940516ecb0d7d6621f09be3f76dc1b5c482b5 Mon Sep 17 00:00:00 2001 From: Nikhil Manchanda Date: Mon, 17 Mar 2014 19:20:08 -0700 Subject: [PATCH] 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 --- trove/tests/unittests/backup/test_backupagent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trove/tests/unittests/backup/test_backupagent.py b/trove/tests/unittests/backup/test_backupagent.py index 9d172f64f0..7028696e43 100644 --- a/trove/tests/unittests/backup/test_backupagent.py +++ b/trove/tests/unittests/backup/test_backupagent.py @@ -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()