Skip to content

Commit

Permalink
add test for random rowid
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioFranco committed Nov 7, 2023
1 parent a89c3f0 commit 392f205
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions libsql-server/tests/standalone/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,25 @@ fn execute_transaction() {

sim.run().unwrap();
}

#[test]
fn random_rowid() {
let mut sim = turmoil::Builder::new().build();

sim.host("primary", make_standalone_server);

sim.client("test", async {
let db = Database::open_remote_with_connector("http://primary:8080", "", TurmoilConnector)?;
let conn = db.connect()?;

conn.execute(
"CREATE TABLE shopping_list(item text, quantity int) RANDOM ROWID",
(),
)
.await?;

Ok(())
});

sim.run().unwrap();
}

0 comments on commit 392f205

Please sign in to comment.