Closed NetDwarf closed 2 years ago
To make sure that the outcome didn't change, because of different sorting, I did this:
go run . -export mysql
echo "DROP DATABASE IF EXISTS dol; CREATE DATABASE dol;" | mysql [credentials] --database=dol < public-db.sql && mysqldump [credentials] dol > dump.sql
md5sum dump.sql
git checkout upstream/master
and repeatThe check sum should be and was the same.
Regarding the testing of import option the testing was straight forward.
git run . -export [exportType]
go run . -import
with specific config.yml (either with file_path or mysql credentials)git diff
)Just for sanity I also did change a single entry to see if it is mirrored in the import. (it was)
Add check for
file_path
option in config.yml Extract import database logic into own interface/types (sqlProvider
for mysql and sqlite) Sort json data by primary key to make it repeatable Rename source files to export.go and import.go respectively