mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-08 14:22:58 +00:00
chore: replace result assertions (#1840)
* s/assert!\((.*)\.is_ok\(\)\);/\1.unwrap\(\);/g * s/assert!\((.*)\.is_some\(\)\);/\1.unwrap\(\);/g
This commit is contained in:
@@ -41,15 +41,15 @@ mod tests {
|
||||
engine: MITO_ENGINE.to_string(),
|
||||
};
|
||||
|
||||
let result = instance
|
||||
instance
|
||||
.frontend()
|
||||
.catalog_manager()
|
||||
.register_system_table(RegisterSystemTableRequest {
|
||||
create_table_request: request,
|
||||
open_hook: None,
|
||||
})
|
||||
.await;
|
||||
assert!(result.is_ok());
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(
|
||||
instance
|
||||
|
||||
@@ -54,8 +54,7 @@ mod tests {
|
||||
],
|
||||
);
|
||||
// should create new table "my_metric_1" directly
|
||||
let result = instance.exec(&data_point1, ctx.clone()).await;
|
||||
assert!(result.is_ok());
|
||||
instance.exec(&data_point1, ctx.clone()).await.unwrap();
|
||||
|
||||
let data_point2 = DataPoint::new(
|
||||
"my_metric_1".to_string(),
|
||||
@@ -67,13 +66,11 @@ mod tests {
|
||||
],
|
||||
);
|
||||
// should create new column "tagk3" directly
|
||||
let result = instance.exec(&data_point2, ctx.clone()).await;
|
||||
assert!(result.is_ok());
|
||||
instance.exec(&data_point2, ctx.clone()).await.unwrap();
|
||||
|
||||
let data_point3 = DataPoint::new("my_metric_1".to_string(), 3000, 3.0, vec![]);
|
||||
// should handle null tags properly
|
||||
let result = instance.exec(&data_point3, ctx.clone()).await;
|
||||
assert!(result.is_ok());
|
||||
instance.exec(&data_point3, ctx.clone()).await.unwrap();
|
||||
|
||||
let output = instance
|
||||
.do_query(
|
||||
|
||||
@@ -315,7 +315,7 @@ pub async fn create_test_table(
|
||||
table_id: table.table_info().ident.table_id,
|
||||
table,
|
||||
};
|
||||
assert!(catalog_manager.register_table(req).await.is_ok());
|
||||
let _ = catalog_manager.register_table(req).await.unwrap();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user