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

Function loads_full_manifest

atomic-agent/src/integrations/manifest.rs:162–195  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160
161 #[test]
162 fn loads_full_manifest() {
163 let tmp = tempfile::tempdir().unwrap();
164 write_manifest(
165 tmp.path(),
166 r#"
167schema = 1
168agent = "opencode"
169version = "1.2.0"
170
171[requires]
172atomic = ">=0.11.0"
173
174[[file]]
175src = "plugins/atomic-hooks.ts"
176dst = "~/.config/opencode/plugins/atomic-hooks.ts"
177
178[[file]]
179src = "agents/atomic.md"
180dst = "~/.config/opencode/agents/atomic.md"
181
182[[settings]]
183manifest = "hooks/opencode.atomic-hooks.json"
184"#,
185 );
186 let m = IntegrationManifest::load(tmp.path()).unwrap();
187 assert_eq!(m.files.len(), 2);
188 assert_eq!(m.files[0].src, "plugins/atomic-hooks.ts");
189 assert_eq!(m.settings.len(), 1);
190 let paths = m.settings_manifest_paths(tmp.path());
191 assert_eq!(
192 paths,
193 vec![tmp.path().join("hooks/opencode.atomic-hooks.json")]
194 );
195 }
196
197 #[test]
198 fn rejects_newer_schema() {

Callers

nothing calls this directly

Calls 4

write_manifestFunction · 0.70
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected