Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karolisg committed Mar 29, 2024
1 parent 1d049d6 commit 161e0c4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions dozer-ingestion/postgres/src/schema/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,16 @@ async fn test_connector_view_cannot_be_used() {
};

let result = schema_helper.get_schemas(&[table_info]).await;
assert!(result.is_err(), "Result is not an error. Result: {:?}", result);
assert!(
result.is_err(),
"Result is not an error. Result: {:?}",
result
);
assert!(matches!(
result.unwrap().get(0).unwrap(),
PostgresConnectorError::PostgresSchemaError(
result.unwrap().first().unwrap(),
Err(PostgresConnectorError::PostgresSchemaError(
PostgresSchemaError::UnsupportedTableType(_, _)
)
))
));

let table_info = ListOrFilterColumns {
Expand All @@ -166,7 +170,7 @@ async fn test_connector_view_cannot_be_used() {
columns: Some(vec![]),
};
let result = schema_helper.get_schemas(&[table_info]).await;
assert!(result.unwrap().get(0).is_ok());
assert!(result.unwrap().first().unwrap().is_ok());

client.drop_schema(&schema).await;
}

0 comments on commit 161e0c4

Please sign in to comment.