Skip to content
Snippets Groups Projects
Commit a01a35a7 authored by Daniel Hornung's avatar Daniel Hornung
Browse files
parent 981ba360
Branches
Tags
No related merge requests found
Pipeline #12950 failed
......@@ -196,4 +196,32 @@ TEST_F(test_issues, server_issue_171) {
std::cout << inserted_rec.ToString() << std::endl;
}
/*
* Inserting a non-file property with an empty file path should work.
*
* The file attributes should be ignored by the server.
*/
TEST_F(test_issues, server_issue_174) {
const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection();
auto insert_transaction(connection->CreateTransaction());
// Create and insert RT
Entity rt;
rt.SetRole(Role::RECORD_TYPE);
rt.SetName("Not a FILE");
rt.SetFilePath("");
insert_transaction->InsertEntity(&rt);
insert_transaction->ExecuteAsynchronously();
auto insert_status = insert_transaction->WaitForIt();
ASSERT_TRUE(insert_status.IsTerminated());
// TODO(tf) Remove the EXPECT_NONFATAL_FAILURE after fixing #174.
EXPECT_NONFATAL_FAILURE(
EXPECT_FALSE(insert_status.IsError())
, "");
}
} // namespace caosdb::transaction
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment