From 82d75b25ae736756a49b8329f40a9b89ebb5795b Mon Sep 17 00:00:00 2001 From: florian <f.spreckelsen@inidscale.com> Date: Wed, 11 Aug 2021 17:10:21 +0200 Subject: [PATCH] DRAFT: Begin tests for transactions --- test/runtests.jl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 5fa1db1..9036bec 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -64,4 +64,24 @@ using CaosDB ), ) CaosDB.Exceptions.evaluate_return_code(Cint(-1)) end + + @testset "TestTransaction" begin + # transactions can be generated from the default connection, + # from a connection name, or from a connection object + @test CaosDB.Transaction.create_transaction() != nothing + @test CaosDB.Transaction.create_transaction("default") != nothing + conn = CaosDB.Connection.get_connection() + @test CaosDB.Transaction.create_transaction != nothing + + # Retrieval works by a single id, by a list of ids, or by querying + trans1 = CaosDB.Transaction.create_transaction() + @test CaosDB.Transaction.add_retrieve_by_id(trans1, "some_id") == nothing + trans2 = CaosDB.Transaction.create_transaction() + @test CaosDB.Transaction.add_retrieve_by_id(["id1", "id2", "id3"]) == nothing + trans3 = CaosDB.Transaction.create_transaction() + @test CaosDB.Transaction.add_query("FIND ENTITY WITH id=123") == nothing + + end + + @testset "TestEntity" begin end end -- GitLab