tests: Use temporary file for known_hosts
Previously, the tests were sharing the same file path to create the
known_hosts file, which can create a race condition if the tests run in
parallel. Such file was deleted between tests.
By using different different files for each test, the risk of race
conditions is eliminated. Moreover, it makes unnecessary to destroy the
file between tests.
Signed-off-by: Anderson Toshiyuki Sasaki <firstname.lastname@example.org>
Reviewed-by: Andreas Schneider <email@example.com>
Reviewed-by: Jakub Jelen <firstname.lastname@example.org>
(cherry picked from commit d4fe8e1f62814287448bb0a042933e3fd3e07e0a)