Skip to content
Snippets Groups Projects
Verified Commit 8509e4c8 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'f-external-ids' into f-string-ids

parents ea46e0e7 d6486cfc
No related branches found
No related tags found
1 merge request!31Draft: Update tests for string ids
Pipeline #41806 failed
......@@ -1328,4 +1328,23 @@ TEST_F(test_transaction, test_full_workflow) {
EXPECT_EQ(retr_transaction->GetResultSet().size(), 1);
}
TEST_F(test_transaction, test_delete_string_id) {
const auto &connection = caosdb::connection::ConnectionManager::GetDefaultConnection();
auto transaction(connection->CreateTransaction());
transaction->DeleteById("20");
transaction->DeleteById("string");
transaction->DeleteById("21");
transaction->ExecuteAsynchronously();
transaction->WaitForIt();
EXPECT_TRUE(transaction->GetStatus().IsTerminated());
EXPECT_TRUE(transaction->GetStatus().IsError());
const auto &results = transaction->GetResultSet();
EXPECT_TRUE(results.at(1).HasErrors());
EXPECT_EQ(results.at(1).GetErrors().size(), 1);
EXPECT_EQ(results.at(1).GetErrors().at(0).GetDescription(), "The entity id is malformed. The id is expected to match a UUID string (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is 0-9 or a-f).");
}
} // namespace caosdb::transaction
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment