Porting unit tests for indexing layer

Please check talloc_new retval