Skip to content

Commit

Permalink
Enforce deprecation of observable:creationTime
Browse files Browse the repository at this point in the history
A follow-on patch will regenerate Make-managed files.

References:
* #508

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
  • Loading branch information
ajnelson-nist committed Jan 6, 2023
1 parent 77c62a2 commit caa2ffa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
9 changes: 1 addition & 8 deletions ontology/uco/observable/observable.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -8859,12 +8859,6 @@ observable:WindowsThreadFacet
rdfs:label "WindowsThreadFacet"@en ;
rdfs:comment "A Windows thread facet is a grouping os characteristics unique to a single thread of execution within a Windows process."@en ;
sh:property
[
sh:datatype xsd:dateTime ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path observable:creationTime ;
] ,
[
sh:datatype xsd:dateTime ;
sh:maxCount "1"^^xsd:integer ;
Expand Down Expand Up @@ -10210,9 +10204,8 @@ observable:creationTime-deprecation-shape
sh:property [
a sh:PropertyShape ;
sh:maxCount "0"^^xsd:integer ;
sh:message "observable:creationTime is deprecated, and will be an error to use in UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:message "observable:creationTime is deprecated, and an error to use as of UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:path observable:creationTime ;
sh:severity sh:Warning ;
] ;
sh:targetSubjectsOf observable:creationTime ;
.
Expand Down
4 changes: 2 additions & 2 deletions tests/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ all: \
location_XFAIL_validation.ttl \
message_thread_PASS_validation.ttl \
message_thread_XFAIL_validation.ttl \
observable_creation_time_PASS_validation.ttl \
observable_creation_time_XFAIL_validation.ttl \
owl_axiom_PASS_validation.ttl \
owl_axiom_XFAIL_validation.ttl \
owl_properties_PASS_validation.ttl \
Expand Down Expand Up @@ -104,7 +104,7 @@ check: \
location_XFAIL_validation.ttl \
message_thread_PASS_validation.ttl \
message_thread_XFAIL_validation.ttl \
observable_creation_time_PASS_validation.ttl \
observable_creation_time_XFAIL_validation.ttl \
owl_axiom_PASS_validation.ttl \
owl_axiom_XFAIL_validation.ttl \
owl_properties_PASS_validation.ttl \
Expand Down
12 changes: 3 additions & 9 deletions tests/examples/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,10 @@ def test_message_thread_PASS_validation() -> None:
def test_message_thread_XFAIL_validation() -> None:
confirm_validation_results("message_thread_XFAIL_validation.ttl", False)

def test_observable_creation_time_PASS() -> None:
def test_observable_creation_time_XFAIL() -> None:
confirm_validation_results(
"observable_creation_time_PASS_validation.ttl",
True,
expected_focus_node_severities={
(
"http://example.org/kb/windows-thread-facet-4967ae35-f00b-49c8-9dd2-38e3bdf851e1",
str(NS_SH.Warning)
)
}
"observable_creation_time_XFAIL_validation.ttl",
False,
)

def test_owl_axiom_PASS() -> None:
Expand Down

0 comments on commit caa2ffa

Please sign in to comment.