Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed Dec 11, 2024
1 parent 005a1fc commit 605023b
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions test/flanders/json_schema_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,65 @@
{uniq (unqualify-recursive-vars-from-schema-explain @(find-var v))}))
(unqualify-vars (collect-transitive-recursive-vars-from-schema @SchemaSecurityFinding)))))
))
(testing "schema ops"
(is (some? (s/check @SchemaSecurityFinding {})))
(is (s/validate @SchemaSecurityFinding {:severity_id 0,
:category_uid 10,
:status_id 0,
:data_sources ["string"],
:api {:operation "foo"} ,
:unmapped {} ,
:class_name "string",
:osint [],
:type_uid 10,
:start_time_dt "string",
:impact_score 10,
:impact_id 0,
:enrichments [],
:nist ["string"],
:cloud {:provider "foo"} ,
:time 10,
:evidence "anything",
:process {} ,
:start_time 10,
:risk_level "string",
:observables [],
:risk_score 10,
:time_dt "string",
:duration 10,
:state "string",
:class_uid 10,
:kill_chain [],
:end_time 10,
:category_name "string",
:analytic {:type_id 0} ,
:activity_name "string",
:confidence_score 10,
:timezone_offset 10,
:status "string",
:count 10,
:severity "string",
:cis_csc [],
:status_detail "string",
:end_time_dt "string",
:status_code "string",
:attacks [],
:finding {:title "foo" :uid "foo"} ,
:raw_data "string",
:confidence "string",
:activity_id 0,
:resources [],
:type_name "string",
:confidence_id 0,
:impact "string",
:metadata {:product {:vendor_name "asdf"} :version "foo"} ,
:compliance {:standards []} ,
:message "string",
:vulnerabilities [],
:malware [],
:state_id 0,
:risk_level_id 0}))
)
(testing "malli ops"
(is (some? (m/explain @MalliSecurityFinding {})))
;;FIXME
Expand Down

0 comments on commit 605023b

Please sign in to comment.