Skip to content

Commit

Permalink
Add CREATE TABLE test for created instance
Browse files Browse the repository at this point in the history
  • Loading branch information
mbr committed Apr 11, 2024
1 parent 7bc9152 commit 51e5033
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,12 @@ mod tests {
con.create_instance("myrole", "mypw", "mydb")
.await
.expect("failed to create instance");

// Now that the instance is created, check every is in working order.
let user_con = pg.as_user("myrole", "mypw");
user_con
.run_sql("mydb", "CREATE TABLE foo (bar INT PRIMARY KEY);")
// .run_sql("mydb", "SELECT current_database();")
.expect("could not run query");
}
}

0 comments on commit 51e5033

Please sign in to comment.