Example #1
0
    def save_current_version_file(self):
        """Save current version in working
        directory if it was not saved during
        previous run.

        This action is important in case
        when upgrade script was interrupted
        after symlinking of version.yaml file.
        """
        utils.copy_if_does_not_exist(self.config.current_fuel_version_path,
                                     self.from_version_path)
Example #2
0
    def save_current(self):
        """Save current version in working directory if it was not saved before

        This action is important in case
        when upgrade script was interrupted
        after symlinking of version.yaml file.
        """
        utils.create_dir_if_not_exists(os.path.dirname(
            self.store_version_file))
        utils.copy_if_does_not_exist(
            self.current_version_file,
            self.store_version_file)
Example #3
0
    def save_current_version_file(self):
        """Save current version in working
        directory if it was not saved during
        previous run.

        This action is important in case
        when upgrade script was interrupted
        after symlinking of version.yaml file.
        """
        utils.copy_if_does_not_exist(
            self.config.current_fuel_version_path,
            self.from_version_path)
Example #4
0
    def save_current(self):
        """Save current version in working
        directory if it was not saved during
        previous run.

        This action is important in case
        when upgrade script was interrupted
        after symlinking of version.yaml file.
        """
        utils.create_dir_if_not_exists(os.path.dirname(
            self.store_version_file))
        utils.copy_if_does_not_exist(
            self.current_version_file,
            self.store_version_file)
 def test_copy_if_does_not_exist_file_does_not_exist(
         self, copy_mock, exists_mock):
     utils.copy_if_does_not_exist('from', 'to')
     exists_mock.assert_called_once_with('to')
     copy_mock.assert_called_once_with('from', 'to')
Example #6
0
 def test_copy_if_does_not_exist_file_does_not_exist(
         self, copy_mock, exists_mock):
     utils.copy_if_does_not_exist('from', 'to')
     exists_mock.assert_called_once_with('to')
     copy_mock.assert_called_once_with('from', 'to')