test suite.

setup testsuite.
test cases for primary. foreign and uniques.
fixes.