-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'inventory-item-has-asset-type' constraint and tests (#1078)
- Loading branch information
Showing
5 changed files
with
33 additions
and
0 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
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/content/ssp-inventory-item-has-asset-type-INVALID.xml
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,7 @@ | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" uuid="11111111-2222-4000-8000-000000000000"> | ||
<system-implementation> | ||
<inventory-item uuid="11111111-2222-4000-8000-011000000001"> | ||
<!-- <prop name="asset-type" value="operating-system"/> Missing "asset-type" prop. --> | ||
</inventory-item> | ||
</system-implementation> | ||
</system-security-plan> |
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
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/inventory-item-has-asset-type-FAIL.yaml
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,9 @@ | ||
test-case: | ||
name: Negative Test for inventory-item-has-asset-type | ||
description: >- | ||
This test case validates the behavior of constraint | ||
inventory-item-has-asset-type | ||
content: ../content/ssp-inventory-item-has-asset-type-INVALID.xml | ||
expectations: | ||
- constraint-id: inventory-item-has-asset-type | ||
result: fail |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/inventory-item-has-asset-type-PASS.yaml
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,9 @@ | ||
test-case: | ||
name: Positive Test for inventory-item-has-asset-type | ||
description: >- | ||
This test case validates the behavior of constraint | ||
inventory-item-has-asset-type | ||
content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml | ||
expectations: | ||
- constraint-id: inventory-item-has-asset-type | ||
result: pass |