mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-05-16 13:56:11 +08:00
Use vcrpy for tests to simulate PDC responses.
This commit is contained in:
@@ -32,30 +32,6 @@ import module_build_service.pdc
|
||||
app = module_build_service.app
|
||||
conf = init_config(app)
|
||||
|
||||
def local_resolve_profiles(pdc_session, mmd, keys):
|
||||
"""
|
||||
Returns the default srpm-buildroot and "buildroot" groups as they
|
||||
would have been return from PDC.
|
||||
|
||||
We are not using real PDC for resolve_profiles in tests,
|
||||
because it makes tests slower and depending on the remote dev
|
||||
PDC instance which is not ideal.
|
||||
"""
|
||||
default_groups = {
|
||||
'srpm-buildroot':
|
||||
set(['shadow-utils', 'fedora-release', 'redhat-rpm-config',
|
||||
'rpm-build', 'fedpkg-minimal', 'gnupg2', 'bash']),
|
||||
'buildroot':
|
||||
set(['unzip', 'fedora-release', 'tar', 'cpio', 'gawk',
|
||||
'gcc', 'xz', 'sed', 'findutils', 'util-linux', 'bash',
|
||||
'info', 'bzip2', 'grep', 'redhat-rpm-config',
|
||||
'diffutils', 'make', 'patch', 'shadow-utils',
|
||||
'coreutils', 'which', 'rpm-build', 'gzip', 'gcc-c++'])}
|
||||
|
||||
return default_groups
|
||||
|
||||
module_build_service.pdc.resolve_profiles = local_resolve_profiles
|
||||
|
||||
def init_data():
|
||||
db.session.remove()
|
||||
db.drop_all()
|
||||
|
||||
Reference in New Issue
Block a user