From 194f7b8772e943dba98d672e738214808eb1a1a7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 13 Jun 2021 20:30:24 +0100 Subject: Code for setting up an initial source from scratch Includes beginnings of the end-to-end test suite. --- test/test-e2e.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/test-e2e.cpp (limited to 'test/test-e2e.cpp') diff --git a/test/test-e2e.cpp b/test/test-e2e.cpp new file mode 100644 index 0000000..fe57e17 --- /dev/null +++ b/test/test-e2e.cpp @@ -0,0 +1,22 @@ +#define BOOST_TEST_MODULE EndToEnd +#include + +#include "testdb-mysql.h" +#include "testdb-postgresql.h" +#include + +BOOST_AUTO_TEST_CASE(e2e) +{ + const char * const target_schema {"testout"}; + using namespace MyGrate::Testing; + MySQLDB my; + PqConnDB pq {ROOT "/db/schema.sql"}; + + auto pqm = pq.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); +} -- cgit v1.2.3