mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-03 13:13:27 +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")
|
||||
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))
|
||||
shutil.copy(source, log_path)
|
||||
except IOError as e:
|
||||
|
||||
@@ -61,7 +61,7 @@ class TestBuild(unittest.TestCase):
|
||||
|
||||
# Ensure that there is no build log from other tests
|
||||
try:
|
||||
path = build_logs.path(self.cg.module.id)
|
||||
path = build_logs.path(self.cg.module)
|
||||
os.remove(path)
|
||||
except OSError:
|
||||
pass
|
||||
@@ -75,7 +75,7 @@ class TestBuild(unittest.TestCase):
|
||||
import moksha.hub.reactor # noqa
|
||||
self.vcr.__exit__()
|
||||
try:
|
||||
path = build_logs.path(self.cg.module.id)
|
||||
path = build_logs.path(self.cg.module)
|
||||
os.remove(path)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
@@ -66,12 +66,14 @@ class TestModuleWait(unittest.TestCase):
|
||||
builder.module_build_tag = {'name': 'some-tag-build'}
|
||||
create_builder.return_value = builder
|
||||
mocked_module_build = mock.Mock()
|
||||
mocked_module_build.extended_json.return_value = {
|
||||
mocked_module_build.json.return_value = {
|
||||
'name': 'foo',
|
||||
'stream': 1,
|
||||
'version': 1,
|
||||
'state': 'some state',
|
||||
'id': 1
|
||||
}
|
||||
mocked_module_build.extended_json = mocked_module_build.json
|
||||
|
||||
mmd = _modulemd.ModuleMetadata()
|
||||
formatted_testmodule_yml_path = os.path.join(
|
||||
|
||||
Reference in New Issue
Block a user