Skip to content

Commit 95830aa

Browse files
Golden Ticket Removal (#19074)
GoldenTicketRemoval
1 parent ca0182e commit 95830aa

2 files changed

Lines changed: 0 additions & 78 deletions

File tree

tests/foreman/cli/test_subscription.py

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,6 @@
2323
pytestmark = [pytest.mark.run_in_one_thread]
2424

2525

26-
@pytest.fixture(scope='module')
27-
def golden_ticket_host_setup(request, module_sca_manifest_org, module_target_sat):
28-
new_product = module_target_sat.cli_factory.make_product(
29-
{'organization-id': module_sca_manifest_org.id}
30-
)
31-
new_repo = module_target_sat.cli_factory.make_repository({'product-id': new_product['id']})
32-
module_target_sat.cli.Repository.synchronize({'id': new_repo['id']})
33-
return module_target_sat.cli_factory.make_activation_key(
34-
{
35-
'lifecycle-environment': 'Library',
36-
'content-view': 'Default Organization View',
37-
'organization-id': module_sca_manifest_org.id,
38-
'auto-attach': False,
39-
}
40-
)
41-
42-
4326
def test_positive_manifest_upload(function_sca_manifest_org, module_target_sat):
4427
"""upload manifest
4528
@@ -244,36 +227,6 @@ def test_positive_candlepin_events_processed_by_STOMP():
244227
"""
245228

246229

247-
def test_positive_auto_attach_disabled_golden_ticket(
248-
module_org, module_location, golden_ticket_host_setup, rhel7_contenthost_class, target_sat
249-
):
250-
"""Verify that Auto-Attach is disabled or "Not Applicable"
251-
when a host organization is in Simple Content Access mode (Golden Ticket)
252-
253-
:id: 668fae4d-7364-4167-967f-6fc31ba52d26
254-
255-
:expectedresults: auto attaching a subscription is not allowed
256-
and returns an error message
257-
258-
:customerscenario: true
259-
260-
:BZ: 1718954
261-
262-
:parametrized: yes
263-
264-
:CaseImportance: Medium
265-
"""
266-
rhel7_contenthost_class.register(
267-
module_org, module_location, golden_ticket_host_setup['name'], target_sat
268-
)
269-
assert rhel7_contenthost_class.subscribed
270-
host = target_sat.cli.Host.list({'search': rhel7_contenthost_class.hostname})
271-
host_id = host[0]['id']
272-
with pytest.raises(CLIReturnCodeError) as context:
273-
target_sat.cli.Host.subscription_auto_attach({'host-id': host_id})
274-
assert "This host's organization is in Simple Content Access mode" in str(context.value)
275-
276-
277230
def test_negative_check_katello_reimport(request, target_sat, function_org):
278231
"""Verify katello:reimport trace should not fail with an TypeError
279232

tests/foreman/ui/test_subscription.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,44 +25,13 @@
2525
DEFAULT_SUBSCRIPTION_NAME,
2626
EXPIRED_MANIFEST,
2727
EXPIRED_MANIFEST_DATE,
28-
PRDS,
29-
REPOS,
30-
REPOSET,
3128
DataFile,
3229
)
3330
from robottelo.utils.issue_handlers import is_open
3431

3532
pytestmark = [pytest.mark.run_in_one_thread]
3633

3734

38-
@pytest.fixture(scope='module')
39-
def golden_ticket_host_setup(function_sca_manifest_org, module_target_sat):
40-
org = function_sca_manifest_org
41-
rh_repo_id = module_target_sat.api_factory.enable_rhrepo_and_fetchid(
42-
basearch='x86_64',
43-
org_id=org.id,
44-
product=PRDS['rhel'],
45-
repo=REPOS['rhst7']['name'],
46-
reposet=REPOSET['rhst7'],
47-
releasever=None,
48-
)
49-
rh_repo = module_target_sat.api.Repository(id=rh_repo_id).read()
50-
rh_repo.sync()
51-
custom_product = module_target_sat.api.Product(organization=org).create()
52-
custom_repo = module_target_sat.api.Repository(
53-
name=gen_string('alphanumeric').upper(), product=custom_product
54-
).create()
55-
custom_repo.sync()
56-
ak = module_target_sat.api.ActivationKey(
57-
content_view=org.default_content_view,
58-
max_hosts=100,
59-
organization=org,
60-
environment=module_target_sat.api.LifecycleEnvironment(id=org.library.id),
61-
auto_attach=True,
62-
).create()
63-
return org, ak
64-
65-
6635
@pytest.mark.e2e
6736
@pytest.mark.upgrade
6837
def test_positive_end_to_end(session, function_sca_manifest, target_sat):

0 commit comments

Comments
 (0)