Issue #95 - Updated ReporterResourcesTest
[jpf-core.git] / src / tests / ReporterResourcesTest.java
index 0e5d3f7ccf240583d1cfd7606767349fea834899..b3662ffcfa33216ac57bbfb85ff4d03034c0cb02 100644 (file)
@@ -34,23 +34,9 @@ public class ReporterResourcesTest extends TestJPF {
   }
 
   @Test
-  public void hashMustMatch() {
+  public void hashMustExist() {
     InputStream stream = jpf.getClass().getResourceAsStream(".version");
-    assertEquals("Should have the same hash", fetchCurrentRevisionFromVCS().trim(), readContentFrom(stream).trim());
-  }
-
-  private String fetchCurrentRevisionFromVCS() {
-    String currentRevision = "";
-    try {
-      Process process = Runtime.getRuntime().exec("git rev-parse HEAD");
-      process.waitFor();
-      InputStream output = process.getInputStream();
-      currentRevision = readContentFrom(output);
-
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-    return currentRevision;
+    assertTrue(".version file should be non-empty", !readContentFrom(stream).trim().isEmpty());
   }
 
   private String readContentFrom(InputStream stream) {