tests: fix cast compilation warning

Signed-off-by: Loic Dachary <ldachary@redhat.com>