Просмотр исходного кода

Also check we can touch the filesystem in healthcheck

Shane Kilkelly 6 лет назад
Родитель
Сommit
40a171d44a

+ 4 - 0
services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java

@@ -266,6 +266,10 @@ public class Bridge {
     public boolean healthCheck() {
        try {
          dbStore.getNumProjects();
+         File rootDirectory = new File("/");
+         if (!rootDirectory.exists()) {
+           throw new Exception("bad filesystem state, root directory does not exist");
+         }
          Log.error("[HealthCheck] passed");
          return true;
        } catch (Exception e)  {