MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_fork_preserves_validator

Function test_fork_preserves_validator

core/src/skills/registry.rs:875–894  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

873
874 #[test]
875 fn test_fork_preserves_validator() {
876 use crate::skills::validator::DefaultSkillValidator;
877
878 let original = SkillRegistry::new();
879 original.set_validator(Arc::new(DefaultSkillValidator::default()));
880
881 let fork = original.fork();
882 let invalid = Arc::new(Skill {
883 name: "BadName".to_string(),
884 description: "invalid".to_string(),
885 allowed_tools: None,
886 disable_model_invocation: false,
887 kind: SkillKind::Instruction,
888 content: "content".to_string(),
889 tags: vec![],
890 version: None,
891 });
892
893 assert!(fork.register(invalid).is_err());
894 }
895
896 #[test]
897 fn test_search_skills_ranks_matches() {

Callers

nothing calls this directly

Calls 2

set_validatorMethod · 0.80
forkMethod · 0.80

Tested by

no test coverage detected