mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-23 18:21:42 +08:00
Fix KojiContentGenerator from a bug in PR 771
This commit is contained in:
@@ -326,7 +326,7 @@ class KojiContentGenerator(object):
|
|||||||
|
|
||||||
log_path = os.path.join(prepdir, "build.log")
|
log_path = os.path.join(prepdir, "build.log")
|
||||||
try:
|
try:
|
||||||
source = build_logs.path(self.module.id)
|
source = build_logs.path(self.module)
|
||||||
log.info("Moving logs from %r to %r" % (source, log_path))
|
log.info("Moving logs from %r to %r" % (source, log_path))
|
||||||
shutil.copy(source, log_path)
|
shutil.copy(source, log_path)
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class TestBuild(unittest.TestCase):
|
|||||||
|
|
||||||
# Ensure that there is no build log from other tests
|
# Ensure that there is no build log from other tests
|
||||||
try:
|
try:
|
||||||
path = build_logs.path(self.cg.module.id)
|
path = build_logs.path(self.cg.module)
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
@@ -75,7 +75,7 @@ class TestBuild(unittest.TestCase):
|
|||||||
import moksha.hub.reactor # noqa
|
import moksha.hub.reactor # noqa
|
||||||
self.vcr.__exit__()
|
self.vcr.__exit__()
|
||||||
try:
|
try:
|
||||||
path = build_logs.path(self.cg.module.id)
|
path = build_logs.path(self.cg.module)
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -66,12 +66,14 @@ class TestModuleWait(unittest.TestCase):
|
|||||||
builder.module_build_tag = {'name': 'some-tag-build'}
|
builder.module_build_tag = {'name': 'some-tag-build'}
|
||||||
create_builder.return_value = builder
|
create_builder.return_value = builder
|
||||||
mocked_module_build = mock.Mock()
|
mocked_module_build = mock.Mock()
|
||||||
mocked_module_build.extended_json.return_value = {
|
mocked_module_build.json.return_value = {
|
||||||
'name': 'foo',
|
'name': 'foo',
|
||||||
'stream': 1,
|
'stream': 1,
|
||||||
'version': 1,
|
'version': 1,
|
||||||
'state': 'some state',
|
'state': 'some state',
|
||||||
|
'id': 1
|
||||||
}
|
}
|
||||||
|
mocked_module_build.extended_json = mocked_module_build.json
|
||||||
|
|
||||||
mmd = _modulemd.ModuleMetadata()
|
mmd = _modulemd.ModuleMetadata()
|
||||||
formatted_testmodule_yml_path = os.path.join(
|
formatted_testmodule_yml_path = os.path.join(
|
||||||
|
|||||||
Reference in New Issue
Block a user