From d74a7b7aec40d83b940dbfe10850734075aa6c5c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 27 Jun 2021 18:59:21 +0100 Subject: Add an existing table to the config --- test/test-e2e.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/test-e2e.cpp') diff --git a/test/test-e2e.cpp b/test/test-e2e.cpp index fe57e17..9906a0b 100644 --- a/test/test-e2e.cpp +++ b/test/test-e2e.cpp @@ -1,9 +1,12 @@ #define BOOST_TEST_MODULE EndToEnd +#include #include #include "testdb-mysql.h" #include "testdb-postgresql.h" #include +#include +#include BOOST_AUTO_TEST_CASE(e2e) { @@ -13,10 +16,16 @@ BOOST_AUTO_TEST_CASE(e2e) PqConnDB pq {ROOT "/db/schema.sql"}; auto pqm = pq.mock(); + auto mym = my.mock(); auto out = MyGrate::Output::Pq::UpdateDatabase::createNew(&pqm, MySQLDB::SERVER, MySQLDB::USER, MySQLDB::PASSWORD, MySQLDB::PORT, my.mockname.c_str(), 100, target_schema); BOOST_CHECK_EQUAL(out.source, 1); auto src = out.getSource(); BOOST_REQUIRE(src); + + MyGrate::sql::createTestTable::execute(&mym); + out.addTable(&mym, "session"); + + BOOST_CHECK_EQUAL(MyGrate::sql::selectTestTable::execute(&pqm)->rows(), 0); } -- cgit v1.2.3