-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def test_foreman_content_view(client_environment, activation_key, organization, foremanapi, client, ssh_config): | ||
client.run('dnf install -y subscription-manager') | ||
rcmd = foremanapi.create('registration_commands', {'organization_id': organization['id'], 'insecure': True, 'activation_keys': [activation_key['name']]}) | ||
client.run_test(rcmd['registration_command']) | ||
client.run('subscription-manager repos --enable=*') | ||
client.run_test('dnf install -y bear') | ||
assert client.package('bear').is_installed | ||
client.run('dnf remove -y bear') | ||
client.run('subscription-manager unregister') | ||
client.run('subscription-manager clean') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
def test_collect_report(host): | ||
host.run('mkdir -p logs') | ||
def test_collect_report(server): | ||
server.run('mkdir -p logs') | ||
for container, filename in [('foreman', '/var/log/foreman/production.log')]: | ||
localfile = filename.replace('/', '_') | ||
host.run(f'podman cp {container}:{filename} logs/{container}-{localfile}') | ||
host.run('tar caf logs.tar.gz logs/') | ||
server.run(f'podman cp {container}:{filename} logs/{container}-{localfile}') | ||
server.run('tar caf logs.tar.gz logs/') | ||
with open('logs.tar.gz', 'wb') as logstar: | ||
logstar.write(host.file('logs.tar.gz').content) | ||
logstar.write(server.file('logs.tar.gz').content) |