MCPcopy Index your code
hub / github.com/StackStorm/st2 / test_validate_failed

Function test_validate_failed

pants-plugins/api_spec/rules_test.py:285–299  ·  view source on GitHub ↗
(rule_runner: RuleRunner)

Source from the content-addressed store, hash-verified

283
284
285def test_validate_failed(rule_runner: RuleRunner) -> None:
286 write_validate_files(
287 api_spec_dir="my_dir",
288 api_spec_file="dummy.yaml",
289 contents="FAIL",
290 rc=1,
291 rule_runner=rule_runner,
292 )
293
294 tgt = rule_runner.get_target(
295 Address("my_dir", target_name="t", relative_file_path="dummy.yaml")
296 )
297 lint_result = run_st2_validate_api_spec(rule_runner, [tgt])
298 assert lint_result.exit_code == 1
299 assert lint_result.report == EMPTY_DIGEST

Callers

nothing calls this directly

Calls 2

write_validate_filesFunction · 0.85

Tested by

no test coverage detected