
Remove the rpm imports from debian patching code. The dnf imports will be removed in a later commit. The patch code had methods, variables and subprocesses that reference 'rpm'. Most of these have been removed or renamed. The remaining 'rpm' references will be removed as functionality related to those calls is implemented for debian ostree. The code is being converted to ostree, so these changes are not currently runnable, nor were the rpm calls on debian. The createrepo calls are also removed, ostree equivalent calls may (or may not) be added in a followup commit. The subprocess exceptions are made more generic, as any uncaight exception in API handling could make the patch controller non-responsive. Robustness improvements may be investigated in a followup commit. Test Plan: Verify build/install/bootstrap/unlock on Debian. Verify sw-patch upload /delete do not report failures using a signed patch. (Note: used an rpm patch for centos) Story: 2009969 Task: 45192 Signed-off-by: Al Bailey <al.bailey@windriver.com> Change-Id: I0590950868805b89dd1e302397d83f1a6f5e244a
22 lines
505 B
Python
22 lines
505 B
Python
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# Copyright (c) 2019 Wind River Systems, Inc.
|
|
#
|
|
|
|
import os
|
|
import testtools
|
|
|
|
from cgcs_patch import patch_functions
|
|
|
|
|
|
class CgcsPatchTestCase(testtools.TestCase):
|
|
|
|
def test_cgcs_patch_functions_get_md5(self):
|
|
md5testfile = os.path.join(os.path.dirname(__file__), 'md5test.txt')
|
|
expected_result = 0x7179a07a8a5c50a3fc9f1971f1ec317f
|
|
|
|
md5result = patch_functions.get_md5(md5testfile)
|
|
|
|
self.assertEqual(expected_result, md5result)
|