fix the autodiscovery test
add discovery tests