You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/integration/README.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,6 +191,7 @@ In case you want to debug the utility script itself, there is the verbose mode f
191
191
*`"verify"`: runs the `macaron verify-policy` command.
192
192
*`"compare"`: compares an output file with an expected output file.
193
193
*`"shell"`: runs an arbitrary shell command.
194
+
*`"schema"`: validates an output file with a schema.
194
195
*`options`: Configuration options for the step. These options are specific to the step kind. See their schema below.
195
196
*`env` (`dict[string, string | null]`, optional): Key value pairs of environment variables being modified during the step after inheriting the environment in which the utility is executed within. Each value can be a string if you want to set a value to the environment variable, or null if you want to "unset" the variable.
196
197
*`expect_fail` (`bool`, optional, default is `false`): If `true`, assert that the step must exit with non-zero code. This should be used for cases where we expect a command to fail.
@@ -214,10 +215,17 @@ In case you want to debug the utility script itself, there is the verbose mode f
214
215
215
216
### Compare step options Schema
216
217
217
-
*`kind` (`"analysis_report_json_schema"|"analysis_report"|"policy_report"|"deps_report"|"vsa"`, required): The kind of JSON report to compare.
218
+
*`kind` (`"analysis_report"|"policy_report"|"deps_report"|"vsa"`, required): The kind of JSON report to compare.
218
219
*`result` (`string`, required): The output file (a relative path from test case directory).
219
220
*`expected` (`string`, required): The expected output file (a relative path from test case directory).
220
221
222
+
### Schema step options Schema
223
+
224
+
*`kind` (`"json_schema"`, required): The kind of schema validation to perform. For now, only json-schema is supported.
225
+
*`result` (`string`, required): The output file (a relative path from test case directory).
226
+
*`schema_type` (`output_json_report`, required): The type of schema for the validation. These are the default schemas available for the integration test.
227
+
*`custom_schema_path` (`string`, optional): The path to the custom schema (a relative path from test case directory). If it is provided, the validation will use this schema and ignore the schema corresponding with `schema_type`.
228
+
221
229
### Shell step options Schema
222
230
223
231
*`cmd` (`string`, required): The shell command to run.
0 commit comments