From c3282a97c654eb1facd4a19c21d8a3757abaa079 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Wed, 7 Nov 2018 08:43:04 +0100 Subject: [PATCH] fix tests --- test/keeper/DIDRegistry.test.ts | 2 +- test/ocean/ServiceAgreement.test.ts | 14 +++++++------- test/ocean/ServiceAgreementTemplate.test.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/keeper/DIDRegistry.test.ts b/test/keeper/DIDRegistry.test.ts index 86e8469..8e8d5d9 100644 --- a/test/keeper/DIDRegistry.test.ts +++ b/test/keeper/DIDRegistry.test.ts @@ -17,7 +17,7 @@ describe("DIDRegistry", () => { before(async () => { ConfigProvider.setConfig(config) - await ContractHandler.deployContracts() + await ContractHandler.prepareContracts() ocean = await Ocean.getInstance(config) didRegistry = await DIDRegistry.getInstance() }) diff --git a/test/ocean/ServiceAgreement.test.ts b/test/ocean/ServiceAgreement.test.ts index 37cfc89..23a49c9 100644 --- a/test/ocean/ServiceAgreement.test.ts +++ b/test/ocean/ServiceAgreement.test.ts @@ -21,7 +21,7 @@ let accounts: Account[] let publisherAccount: Account let consumerAccount: Account -let serviceDefintion +let serviceDefinition describe("ServiceAgreement", () => { @@ -44,7 +44,7 @@ describe("ServiceAgreement", () => { const ddoConditions: DDOCondition[] = conditions.map((condition): DDOCondition => { return { name: condition.methodReflection.methodName, - timeout: 100, + timeout: condition.timeout, conditionKey: condition.condtionKey, parameters: condition.methodReflection.inputs.map((input) => { return { @@ -55,7 +55,7 @@ describe("ServiceAgreement", () => { } as DDOCondition }) - serviceDefintion = [ + serviceDefinition = [ { serviceDefinitionId: IdGenerator.generateId(), templateId: serviceAgreementTemplate.getId(), @@ -65,12 +65,12 @@ describe("ServiceAgreement", () => { }) - describe("#createServiceAgreement()", () => { + describe("#signServiceAgreement()", () => { it("should execute an service agreement", async () => { const id: string = IdGenerator.generateId() const did: string = `did:op:${id}` - const ddo = new DDO({id: did, service: serviceDefintion}) + const ddo = new DDO({id: did, service: serviceDefinition}) const assetId: string = IdGenerator.generateId() const serviceAgreementId: string = IdGenerator.generateId() @@ -92,7 +92,7 @@ describe("ServiceAgreement", () => { const id: string = IdGenerator.generateId() const did: string = `did:op:${id}` - const ddo = new DDO({id: did, service: serviceDefintion}) + const ddo = new DDO({id: did, service: serviceDefinition}) const assetId: string = IdGenerator.generateId() const serviceAgreementId: string = IdGenerator.generateId() @@ -113,7 +113,7 @@ describe("ServiceAgreement", () => { const id: string = IdGenerator.generateId() const did: string = `did:op:${id}` - const ddo = new DDO({id: did, service: serviceDefintion}) + const ddo = new DDO({id: did, service: serviceDefinition}) const assetId: string = IdGenerator.generateId() const serviceAgreementId: string = IdGenerator.generateId() diff --git a/test/ocean/ServiceAgreementTemplate.test.ts b/test/ocean/ServiceAgreementTemplate.test.ts index 66c620e..2cf696b 100644 --- a/test/ocean/ServiceAgreementTemplate.test.ts +++ b/test/ocean/ServiceAgreementTemplate.test.ts @@ -21,7 +21,7 @@ describe("ServiceAgreementTemplate", () => { }) describe("#register()", () => { - it("should setup an agreement template", async () => { + it("should setup an Access agreement template correctly", async () => { const templateOwner = accounts[0] const serviceAgreementTemplate: ServiceAgreementTemplate =