Closed cryptoquick closed 6 months ago
Lots of tests are failing
Lots of tests are failing
I will check this. The error being described is related to file manipulation.
@crisdut Can you check if bitmaskd isn't being instantiated in time for it to ensure the directory is initialized for backend integration tests?
Can you check if bitmaskd isn't being instantiated in time for it to ensure the directory is initialized for backend integration tests?
We instance bitmaskd
only for wasm32 tests. For integration tests, we call functions directly.
We need a verification like this:
let dir = env::var("CARBONADO_DIR").unwrap_or("/tmp/bitmaskd/carbonado".to_owned());
if !Path::new(&format!("{dir}/metrics.json")).exists()
|| !Path::new(&format!("{dir}/metrics.csv")).exists()
{
init(Path::new(&dir)).await?;
}
This should be a superior approach that addresses a concern @crisdut raised about using a Lazy RwLock and also should lessen the burden on the server.
Supersedes #438