From dd6c38dd5bffa4e139cd1ddd20c6215289e3aa61 Mon Sep 17 00:00:00 2001
From: Winston Li
Date: Sun, 11 Jan 2015 12:38:17 +0000
Subject: [PATCH] Changed the name of the directory from git to repo.
---
.../uk/ac/ic/wlgitbridge/test/util/FileUtil.java | 6 +++---
.../ic/wlgitbridge/WLGitBridgeIntegrationTest.java | 5 ++---
.../canCloneARepository/state/git | 1 -
.../canCloneARepository/state/repo/foo/bar/test.tex | 1 +
.../canCloneARepository/state/repo/main.tex | 1 +
.../state/repo/min_mean_wait_evm_7_eps_150dpi.png | 12 ++++++++++++
.../canCloneARepository/state/state.json | 2 +-
7 files changed, 20 insertions(+), 8 deletions(-)
delete mode 160000 services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/git
create mode 100644 services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/foo/bar/test.tex
create mode 100644 services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/main.tex
create mode 100644 services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/min_mean_wait_evm_7_eps_150dpi.png
diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/test/util/FileUtil.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/test/util/FileUtil.java
index fc471bc5ed..80a9a343b5 100644
--- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/test/util/FileUtil.java
+++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/test/util/FileUtil.java
@@ -56,9 +56,9 @@ public class FileUtil {
byte[] secondContents = Files.readAllBytes(second);
boolean equals = Arrays.equals(firstContents, secondContents);
if (!equals) {
-// System.out.println("Not equal: (" + first + ", " + second + ")");
-// System.out.println(first + ": " + new String(firstContents));
-// System.out.println(second + ": " + new String(secondContents));
+ System.out.println("Not equal: (" + first + ", " + second + ")");
+ System.out.println(first + ": " + new String(firstContents));
+ System.out.println(second + ": " + new String(secondContents));
}
return equals;
} catch (IOException e) {
diff --git a/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest.java b/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest.java
index e12628ee73..42570d0307 100644
--- a/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest.java
+++ b/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest.java
@@ -18,8 +18,7 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
-
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
/**
* Created by Winston on 11/01/15.
@@ -58,7 +57,7 @@ public class WLGitBridgeIntegrationTest {
.call()
.close();
wlgb.stop();
- assertTrue(FileUtil.gitDirectoriesAreEqual(getResource("/canCloneARepository/state/git"), git.toPath()));
+ assertTrue(FileUtil.gitDirectoriesAreEqual(getResource("/canCloneARepository/state/repo"), git.toPath()));
}
private String makeConfigFile() throws IOException {
diff --git a/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/git b/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/git
deleted file mode 160000
index 3c01dd67c2..0000000000
--- a/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/git
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 3c01dd67c26f031763282b1436b91bdb5309cda4
diff --git a/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/foo/bar/test.tex b/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/foo/bar/test.tex
new file mode 100644
index 0000000000..046794f19a
--- /dev/null
+++ b/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/foo/bar/test.tex
@@ -0,0 +1 @@
+This text is from another file.
\ No newline at end of file
diff --git a/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/main.tex b/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/main.tex
new file mode 100644
index 0000000000..6b584e8ece
--- /dev/null
+++ b/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/main.tex
@@ -0,0 +1 @@
+content
\ No newline at end of file
diff --git a/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/min_mean_wait_evm_7_eps_150dpi.png b/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/min_mean_wait_evm_7_eps_150dpi.png
new file mode 100644
index 0000000000..25d1ef6093
--- /dev/null
+++ b/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/repo/min_mean_wait_evm_7_eps_150dpi.png
@@ -0,0 +1,12 @@
+
+
+
+Error 404
+
+
+HTTP ERROR: 404
+Problem accessing /canCloneARepository/state/repo/min_mean_wait_evm_7_eps_150dpi.png. Reason:
+
Not Found
+
Powered by Jetty://
+
+
diff --git a/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/state.json b/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/state.json
index 977d874aee..c6d5b5f42f 100644
--- a/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/state.json
+++ b/services/git-bridge/src/test/resources/uk/ac/ic/wlgitbridge/WLGitBridgeIntegrationTest/canCloneARepository/state/state.json
@@ -31,7 +31,7 @@
],
"atts": [
{
- "url": "http://127.0.0.1:60000/canCloneARepository/state/git/min_mean_wait_evm_7_eps_150dpi.png",
+ "url": "http://127.0.0.1:60000/canCloneARepository/state/repo/min_mean_wait_evm_7_eps_150dpi.png",
"path": "min_mean_wait_evm_7_eps_150dpi.png"
}
]