Skip to content

Commit

Permalink
create a fake ntp module
Browse files Browse the repository at this point in the history
the one in the repo is too old
  • Loading branch information
evgeni committed Nov 25, 2024
1 parent 512ce62 commit 75309d1
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/foreman/sys/test_fam.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ def setup_fam(module_target_sat, module_sca_manifest, install_import_ansible_rol
f'''sed -i 's|subscription_manifest_path:.*|subscription_manifest_path: "data/{module_sca_manifest.name}"|g' {config_file}'''
)

repo_path = '/fake_puppet1/system/releases/p/puppetlabs/'
module_tarball = 'puppetlabs-ntp-3.0.3.tar.gz'
local_path = '/tmp'
module_target_sat.execute(
f'curl --output {local_path}/{module_tarball} {settings.robottelo.repos_hosting_url}{repo_path}{module_tarball}',
)
module_target_sat.execute(
f'puppet module install --ignore-dependencies {local_path}/{module_tarball}'
)

def create_fake_module(module_target_sat, module_name, module_classes):
base_dir = '/etc/puppetlabs/code/environments/production/modules'
module_dir = f'{base_dir}/{module_name}'
Expand All @@ -128,6 +118,12 @@ def create_fake_module(module_target_sat, module_name, module_classes):
temp_file=True,
)

create_fake_module(
module_target_sat,
'ntp',
[('init', '($logfile, $config_dir, $servers, $burst, $stepout){}'), 'config'],
)

create_fake_module(
module_target_sat,
'prometheus',
Expand Down

0 comments on commit 75309d1

Please sign in to comment.