From a43ef2a689a4a0fc27572b27c20f827f17035dba Mon Sep 17 00:00:00 2001 From: Ivaylo Kirilov Date: Wed, 13 Mar 2019 17:52:00 +0000 Subject: [PATCH] Fix integration test --- .../java/tech/pegasys/pantheon/enclave/EnclaveTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/enclave/src/integration-test/java/tech/pegasys/pantheon/enclave/EnclaveTest.java b/enclave/src/integration-test/java/tech/pegasys/pantheon/enclave/EnclaveTest.java index 56265d0855..07883b47de 100644 --- a/enclave/src/integration-test/java/tech/pegasys/pantheon/enclave/EnclaveTest.java +++ b/enclave/src/integration-test/java/tech/pegasys/pantheon/enclave/EnclaveTest.java @@ -17,6 +17,7 @@ import static org.junit.Assert.assertTrue; import tech.pegasys.orion.testutil.OrionTestHarness; +import tech.pegasys.orion.testutil.OrionTestHarnessFactory; import tech.pegasys.pantheon.enclave.types.ReceiveRequest; import tech.pegasys.pantheon.enclave.types.ReceiveResponse; import tech.pegasys.pantheon.enclave.types.SendRequest; @@ -45,7 +46,9 @@ public class EnclaveTest { public static void setUpOnce() throws Exception { folder.create(); - testHarness = OrionTestHarness.create(folder.newFolder().toPath()); + testHarness = + OrionTestHarnessFactory.create( + folder.newFolder().toPath(), "orion_key_0.pub", "orion_key_0.key"); enclave = new Enclave(testHarness.clientUrl()); } @@ -65,10 +68,10 @@ public void testSendAndReceive() throws IOException { List publicKeys = testHarness.getPublicKeys(); SendRequest sc = - new SendRequest(PAYLOAD, publicKeys.get(0), Lists.newArrayList(publicKeys.get(1))); + new SendRequest(PAYLOAD, publicKeys.get(0), Lists.newArrayList(publicKeys.get(0))); SendResponse sr = enclave.send(sc); - ReceiveRequest rc = new ReceiveRequest(sr.getKey(), publicKeys.get(1)); + ReceiveRequest rc = new ReceiveRequest(sr.getKey(), publicKeys.get(0)); ReceiveResponse rr = enclave.receive(rc); assertEquals(PAYLOAD, new String(rr.getPayload(), UTF_8));