Skip to content

Commit

Permalink
start adding cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Jun 18, 2023
1 parent ce2bedc commit cb53c33
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/docbuilder/rustwide_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,34 @@ mod tests {
})
}

#[test]
#[ignore]
fn test_artifact_cache() {
wrapper(|env| {
let crate_ = DUMMY_CRATE_NAME;
let version = DUMMY_CRATE_VERSION;
let mut builder = RustwideBuilder::init(env).unwrap();
assert!(builder.build_package(crate_, version, PackageKind::CratesIo)?);

let cache_dir = env.config().prefix.join("artifact_cache");
dbg!(std::fs::read_dir(&cache_dir)?);

panic!("fail");

// let storage = env.storage();

// // doc archive exists
// let doc_archive = rustdoc_archive_path(crate_, version);
// assert!(storage.exists(&doc_archive)?);

// // source archive exists
// let source_archive = source_archive_path(crate_, version);
// assert!(storage.exists(&source_archive)?);

Ok(())
});
}

#[test]
#[ignore]
fn test_proc_macro() {
Expand Down

0 comments on commit cb53c33

Please sign in to comment.