diff options
Diffstat (limited to 'test/test-e2e.cpp')
-rw-r--r-- | test/test-e2e.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
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 <boost/test/unit_test.hpp> + +#include "testdb-mysql.h" +#include "testdb-postgresql.h" +#include <output/pq/updateDatabase.h> + +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); +} |