tests: rename dir to test
index: fix undefined variables