Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Commit ca61dac

Browse files
committed
[WIPTEST] New test: test_rest_vm_compliance_subcollection
1 parent b34d750 commit ca61dac

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

cfme/tests/control/test_compliance.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,33 @@ def test_compliance_instance(create_policy_profile, create_vm, request):
276276
view.flash.assert_message(
277277
"Check Compliance initiated for 1 VM and Instance from the CFME Database"
278278
)
279+
280+
281+
@test_requirements.rest
282+
@pytest.mark.meta(automates=[1806660, 1806656])
283+
def test_rest_vm_compliance_subcollection(create_policy_profile, compliance_vm):
284+
"""
285+
Bugzilla:
286+
1806660
287+
1806656
288+
289+
Polarion:
290+
assignee: pvala
291+
casecomponent: Infra
292+
caseimportance: medium
293+
initialEstimate: 1/10h
294+
setup:
295+
1. Create condition.
296+
2. Create policy with the condition.
297+
3. Create a policy profile with the policy.
298+
4. Provision a VM.
299+
testSteps:
300+
1. Assign policy profile to the VM.
301+
2. Scan the VM.
302+
3. Check compliance of the VM.
303+
4. Check if compliance data is available under VM's `compliances` subcollection
304+
"""
305+
compliance_vm.assign_policy_profiles(create_policy_profile.description)
306+
do_scan(compliance_vm)
307+
compliance_vm.check_compliance()
308+
assert compliance_vm.rest_api_entity.compliances.all

0 commit comments

Comments
 (0)