tests: make git-storage test more robust

The code was crashing if it couldn't reach the cloud, because then
info.repo is NULL. Skip the test if that happens.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-16 19:14:38 +01:00 committed by bstoeger
parent 322c3b55e6
commit 157b52aa6e

View file

@ -58,7 +58,7 @@ static void localRemoteCleanup()
// this odd comparison is used to tell that we were able to connect to the remote repo;
// in the error case we get the full cloudTestRepo name back as "branch"
if (info.branch != randomBranch) {
if (info.branch != randomBranch || info.repo == nullptr) {
// dang, we weren't able to connect to the server - let's not fail the test
// but just give up
QSKIP("wasn't able to connect to server");