From 157b52aa6ee307264749f1f85df981490e8a6712 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 16 Mar 2024 19:14:38 +0100 Subject: [PATCH] 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 --- tests/testgitstorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testgitstorage.cpp b/tests/testgitstorage.cpp index ea6116e4c..35959c4c3 100644 --- a/tests/testgitstorage.cpp +++ b/tests/testgitstorage.cpp @@ -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");