Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
iikirilov committed Mar 13, 2019
1 parent a47b6a5 commit a43ef2a
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
Expand All @@ -65,10 +68,10 @@ public void testSendAndReceive() throws IOException {
List<String> 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));
Expand Down

0 comments on commit a43ef2a

Please sign in to comment.