Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.
Merged
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
30 changes: 30 additions & 0 deletions cfme/tests/control/test_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,33 @@ def test_compliance_instance(create_policy_profile, create_vm, request):
view.flash.assert_message(
"Check Compliance initiated for 1 VM and Instance from the CFME Database"
)


@test_requirements.rest
@pytest.mark.meta(automates=[1806660, 1806656])
def test_rest_vm_compliance_subcollection(create_policy_profile, compliance_vm):
"""
Bugzilla:
1806660
1806656

Polarion:
assignee: pvala
casecomponent: Infra
caseimportance: medium
initialEstimate: 1/10h
setup:
1. Create condition.
2. Create policy with the condition.
3. Create a policy profile with the policy.
4. Provision a VM.
testSteps:
1. Assign policy profile to the VM.
2. Scan the VM.
3. Check compliance of the VM.
4. Check if compliance data is available under VM's `compliances` subcollection
"""
compliance_vm.assign_policy_profiles(create_policy_profile.description)
do_scan(compliance_vm)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

compliance_vm.check_compliance()
assert compliance_vm.rest_api_entity.compliances.all