main: add basic functional test

wait on #1315 
tlsinfo should be configurable.