FYI, Im setting up a bigtop dev environment and VM for testing the existing stuff now. This may be a while, after looking at the code im seeing that setting up a solid dev environment, as well as removing sql implementation specifics might not be the most practical approach. So anyone else wants to jump in feel free. Otherwise, I'll incrementally progress and update along the way.
Here is the path im taking:
1) Set up dev environment with bigtop sqoop smoke tests.
2) Set up VM with MySQL installed to confirm that reproduce the mysql tests, passing.
3) Change the code and rebuild the sqoop smoke test jars and confirm that i can redeploy the smoke tests (i.e. that i have a working dev environment that can be deployed to my VM).
So far ive looked into the code, which appears to load sql requests from text files, and Initially, I see there is a lot of SQL code in the mysql tests . It remains to be seen wether mocking will even be practical. I might first try swapping in derby/h2 as a first pass, to see if decoupling from mysql is easy enough. Then moving on to mocks or commiting that patch as a first iteration.
Given other obligatins, FYI, this will be slow going. If anyone else wants to jump in feel free
Here is the summary of SQL files used in the existing tests Import/Export tests. 604 lines in all.
[root@localhost bigtop]# wc `find ./ -name mysql*sql`
38 226 1424 ./bigtop-tests/test-artifacts/sqoop/src/main/resources/hbase-sqoop/mysql-load-db.sql
38 202 1285 ./bigtop-tests/test-artifacts/sqoop/src/main/resources/hbase-sqoop/mysql-create-db.sql
54 385 2354 ./bigtop-tests/test-artifacts/sqoop/src/main/resources/mysql-files/mysql-create-tables.sql
39 175 1174 ./bigtop-tests/test-artifacts/sqoop/src/main/resources/mysql-files/mysql-create-db.sql
57 263 3104 ./bigtop-tests/test-artifacts/sqoop/src/main/resources/mysql-files/mysql-insert-data.sql
38 226 1420 ./bigtop-tests/test-artifacts/sqoop/src/main/resources/hive-sqoop/mysql-load-db.sql
38 202 1277 ./bigtop-tests/test-artifacts/sqoop/src/main/resources/hive-sqoop/mysql-create-db.sql
38 226 1424 ./bigtop-tests/test-artifacts/sqoop/target/classes/hbase-sqoop/mysql-load-db.sql
38 202 1285 ./bigtop-tests/test-artifacts/sqoop/target/classes/hbase-sqoop/mysql-create-db.sql
54 385 2354 ./bigtop-tests/test-artifacts/sqoop/target/classes/mysql-files/mysql-create-tables.sql
39 175 1174 ./bigtop-tests/test-artifacts/sqoop/target/classes/mysql-files/mysql-create-db.sql
57 263 3104 ./bigtop-tests/test-artifacts/sqoop/target/classes/mysql-files/mysql-insert-data.sql
38 226 1420 ./bigtop-tests/test-artifacts/sqoop/target/classes/hive-sqoop/mysql-load-db.sql
38 202 1277 ./bigtop-tests/test-artifacts/sqoop/target/classes/hive-sqoop/mysql-create-db.sql
604 3358 24076 total