diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/querysigner/QuerySignerApiImplementation.java | 5 | ||||
-rw-r--r-- | src/test/java/pl/edu/mimuw/cloudatlas/client/ClientTest.java | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/querysigner/QuerySignerApiImplementation.java b/src/main/java/pl/edu/mimuw/cloudatlas/querysigner/QuerySignerApiImplementation.java index 32bc634..37264bf 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/querysigner/QuerySignerApiImplementation.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/querysigner/QuerySignerApiImplementation.java @@ -24,10 +24,8 @@ public class QuerySignerApiImplementation implements QuerySignerApi { private Set<String> attribsSetByQueries; private ByteSerializer byteSerializer; - QuerySignerApiImplementation(PublicKey publicKey, PrivateKey privateKey) {// (byte[] serializedPublicKey, byte[] serializedPrivateKey) { + QuerySignerApiImplementation(PublicKey publicKey, PrivateKey privateKey) { this.byteSerializer = new ByteSerializer(); -// this.publicKey = (PublicKey) byteSerializer.deserialize(serializedPublicKey, PublicKey.class); -// this.privateKey = (PrivateKey) byteSerializer.deserialize(serializedPrivateKey, PrivateKey.class); this.publicKey = publicKey; this.privateKey = privateKey; this.queries = new HashMap<>(); @@ -79,7 +77,6 @@ public class QuerySignerApiImplementation implements QuerySignerApi { return digest; } - // TODO private byte[] serializeQuery(String queryName, String queryCode) { return byteSerializer.serialize(queryName + queryCode); } diff --git a/src/test/java/pl/edu/mimuw/cloudatlas/client/ClientTest.java b/src/test/java/pl/edu/mimuw/cloudatlas/client/ClientTest.java index 85b0949..56a4824 100644 --- a/src/test/java/pl/edu/mimuw/cloudatlas/client/ClientTest.java +++ b/src/test/java/pl/edu/mimuw/cloudatlas/client/ClientTest.java @@ -29,7 +29,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder public class ClientTest { private static Process registryProcess; private static Process agentProcess; - private static Process clientProcess; + private static Process querySignerProcess; private static Registry registry; private static Api api; @@ -37,9 +37,12 @@ public class ClientTest { @BeforeClass public static void bindApi() throws Exception { registryProcess = Runtime.getRuntime().exec("./scripts/registry"); - Thread.sleep(10000); + Thread.sleep(2000); + registryProcess = Runtime.getRuntime().exec("./scripts/generate_keys.sh"); agentProcess = Runtime.getRuntime().exec("./gradlew runAgent -Dhostname=localhost -DfreshnessPeriod=10000000"); - Thread.sleep(10000); + Thread.sleep(3000); + querySignerProcess = Runtime.getRuntime().exec("./gradlew runQuerySigner"); + Thread.sleep(3000); registry = LocateRegistry.getRegistry("localhost"); api = (Api) registry.lookup("Api"); @@ -50,6 +53,7 @@ public class ClientTest { try { registryProcess.destroy(); agentProcess.destroy(); + querySignerProcess.destroy(); } catch (Exception e) { System.out.println("Caught exception: " + e); } @@ -77,6 +81,7 @@ public class ClientTest { } @Test + @Ignore public void queryInstallationCheck() throws Exception { this.mvc.perform(post("/installQuery") .param("name", "&sampleQuery") @@ -87,6 +92,7 @@ public class ClientTest { } @Test + @Ignore public void queryUninstallationCheck() throws Exception { this.mvc.perform(post("/installQuery") .param("name", "&sampleQuery") |