MCPcopy Create free account
hub / github.com/apache/paimon-rust / test_create_database

Function test_create_database

crates/paimon/tests/rest_api_test.rs:86–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84
85#[tokio::test]
86async fn test_create_database() {
87 let ctx = setup_test_server(vec!["default"]).await;
88
89 // Create new database
90 let result = ctx.api.create_database("new_db", None).await;
91 assert!(result.is_ok(), "failed to create database: {result:?}");
92
93 // Verify creation
94 let dbs = ctx.api.list_databases().await.unwrap();
95 assert!(dbs.contains(&"new_db".to_string()));
96
97 // Duplicate creation should fail
98 let result = ctx.api.create_database("new_db", None).await;
99 assert!(result.is_err(), "creating duplicate database should fail");
100}
101
102#[tokio::test]
103async fn test_get_database() {

Callers

nothing calls this directly

Calls 3

setup_test_serverFunction · 0.85
create_databaseMethod · 0.45
list_databasesMethod · 0.45

Tested by

no test coverage detected