Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests SCA-Compliant #14679

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/foreman/api/test_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def test_negative_capsule_without_registration_enabled(
module_target_sat,
module_capsule_configured,
module_ak_with_cv,
module_entitlement_manifest_org,
module_sca_manifest_org,
module_location,
):
"""Verify registration with Capsule, when registration isn't configured in installer
Expand All @@ -241,7 +241,7 @@ def test_negative_capsule_without_registration_enabled(

:expectedresults: Registration fails with HTTP error code 422 and an error message.
"""
org = module_entitlement_manifest_org
org = module_sca_manifest_org

nc = module_capsule_configured.nailgun_smart_proxy
module_target_sat.api.SmartProxy(id=nc.id, organization=[org]).update(['organization'])
Expand Down
9 changes: 4 additions & 5 deletions tests/foreman/cli/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import re

from fauxfactory import gen_string
from nailgun import entities
import pytest

from robottelo.config import settings
Expand Down Expand Up @@ -130,7 +129,7 @@ def test_positive_logging_from_foreman_proxy(target_sat):


@pytest.mark.tier4
def test_positive_logging_from_candlepin(module_org, module_entitlement_manifest, target_sat):
def test_positive_logging_from_candlepin(module_org, module_sca_manifest, target_sat):
"""Check logging after manifest upload.

:id: 8c06e501-52d7-4baf-903e-7de9caffb066
Expand All @@ -148,7 +147,7 @@ def test_positive_logging_from_candlepin(module_org, module_entitlement_manifest
# get the number of lines in the source log before the test
line_count_start = target_sat.execute(f'wc -l < {source_log}').stdout.strip('\n')
# command for this test
with module_entitlement_manifest as manifest:
with module_sca_manifest as manifest:
target_sat.upload_manifest(module_org.id, manifest, interface='CLI')
# get the number of lines in the source log after the test
line_count_end = target_sat.execute(f'wc -l < {source_log}').stdout.strip('\n')
Expand Down Expand Up @@ -185,12 +184,12 @@ def test_positive_logging_from_dynflow(module_org, target_sat):
POST_line_found = False
source_log = '/var/log/foreman/production.log'
test_logfile = '/var/tmp/logfile_dynflow'
product = entities.Product(organization=module_org).create()
product = target_sat.api.Product(organization=module_org).create()
repo_name = gen_string('alpha')
# get the number of lines in the source log before the test
line_count_start = target_sat.execute(f'wc -l < {source_log}').stdout.strip('\n')
# command for this test
new_repo = entities.Repository(name=repo_name, product=product).create()
new_repo = target_sat.api.Repository(name=repo_name, product=product).create()
logger.info(f'Created Repo {new_repo.name} for dynflow log test')
# get the number of lines in the source log after the test
line_count_end = target_sat.execute(f'wc -l < {source_log}').stdout.strip('\n')
Expand Down