We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e673fb5 commit 128878eCopy full SHA for 128878e
1 file changed
libsql/tests/encryption.rs
@@ -45,6 +45,17 @@ async fn test_encryption() {
45
assert_eq!(text, "the only winning move is not to play");
46
}
47
48
+ // let's test encryption with connection string
49
+ {
50
+ let conn_str = format!("file:{}?key=s3cR3t", tempdir.join("encrypted.db").display());
51
+ let db = Builder::new_local(&conn_str).build().await.unwrap();
52
+ let conn = db.connect().unwrap();
53
+ let mut results = conn.query("SELECT * FROM messages", ()).await.unwrap();
54
+ let row = results.next().await.unwrap().unwrap();
55
+ let text: String = row.get(0).unwrap();
56
+ assert_eq!(text, "the only winning move is not to play");
57
+ }
58
+
59
{
60
let _ = std::fs::remove_file(&encrypted_path);
61
let _ = std::fs::remove_file(&base_path);
0 commit comments