diff --git a/Cargo.toml b/Cargo.toml index 73af825..70930dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,9 @@ name = "aqua-dht" path = "src/main.rs" [dependencies] -fluence = "0.5.0" -fce-sqlite-connector = "0.3.0" +fluence = "0.6.1" +fce-sqlite-connector = "0.4.0" fstrings = "0.2.3" + +[dev-dependencies] +fluence-test = "0.1.2" \ No newline at end of file diff --git a/build.sh b/build.sh index cfd91e6..db18894 100755 --- a/build.sh +++ b/build.sh @@ -7,4 +7,4 @@ fce build --release rm -f artifacts/* mkdir -p artifacts cp target/wasm32-wasi/release/aqua-dht.wasm artifacts/ -curl -L https://github.com/fluencelabs/sqlite/releases/download/v0.10.0_w/sqlite3.wasm -o artifacts/sqlite3.wasm +curl -L https://github.com/fluencelabs/sqlite/releases/download/v0.14.0_w/sqlite3.wasm -o artifacts/sqlite3.wasm diff --git a/src/main.rs b/src/main.rs index 5f567d0..82389e8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,6 @@ use crate::results::{Record, GetValueResult, PutValueResult, ClearExpiredResult, use fluence::fce; use fluence::module_manifest; - use fce_sqlite_connector; use fce_sqlite_connector::{Connection, Result as SqliteResult, Error as SqliteError, State}; @@ -130,4 +129,15 @@ pub fn get_stale_records(current_timestamp: u64) -> GetStaleRecordsResult { } get_stale_records_impl(current_timestamp).into() -} \ No newline at end of file +} + +#[cfg(test)] +mod tests { + use fluence_test::fce_test; + + #[fce_test(config_path = "Config.toml", modules_dir = "artifacts")] + fn test() { + let result = aqua - dht.get_value("key3"); + assert(!result.success); + } +}