MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / installs_skills_from_cache

Function installs_skills_from_cache

atomic-agent/src/integrations/install.rs:1055–1074  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1053 #[test]
1054 #[serial]
1055 fn installs_skills_from_cache() {
1056 let home = tempfile::tempdir().unwrap();
1057 std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path());
1058 let dst = tempfile::tempdir().unwrap();
1059 let cache = fake_skills_cache();
1060 let pkg = fake_plugin_with_skills("skill-test", dst.path());
1061
1062 let mut o = opts(false);
1063 o.skills_cache_dir = Some(cache.path().to_path_buf());
1064 let outcome = install_from_dir(pkg.path(), &o).unwrap();
1065
1066 assert_eq!(outcome.installed.len(), 1);
1067 let skill_dst = dst.path().join("skills/atomic-vault/SKILL.md");
1068 assert!(skill_dst.exists());
1069 assert_eq!(
1070 std::fs::read_to_string(&skill_dst).unwrap(),
1071 "# atomic-vault skill\n"
1072 );
1073 std::env::remove_var("ATOMIC_INTEGRATIONS_HOME");
1074 }
1075
1076 #[test]
1077 #[serial]

Callers

nothing calls this directly

Calls 6

fake_skills_cacheFunction · 0.85
fake_plugin_with_skillsFunction · 0.85
optsFunction · 0.85
install_from_dirFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected