diff --git a/packages/core/src/exposed-thing.ts b/packages/core/src/exposed-thing.ts index 837ef19d1..66dd9666c 100644 --- a/packages/core/src/exposed-thing.ts +++ b/packages/core/src/exposed-thing.ts @@ -161,9 +161,10 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing { readProperty(propertyName: string, options?: WoT.InteractionOptions): Promise { return new Promise((resolve, reject) => { if (this.properties[propertyName]) { - if(this.properties[propertyName].writeOnly && this.properties[propertyName].writeOnly === true) { + // writeOnly check skipped so far, see https://github.com/eclipse/thingweb.node-wot/issues/333#issuecomment-724583234 + /* if(this.properties[propertyName].writeOnly && this.properties[propertyName].writeOnly === true) { reject(new Error(`ExposedThing '${this.title}', property '${propertyName}' is writeOnly`)); - } + } */ let ps: PropertyState = this.properties[propertyName].getState(); // call read handler (if any) @@ -227,9 +228,10 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing { writeProperty(propertyName: string, value: any, options?: WoT.InteractionOptions): Promise { return new Promise((resolve, reject) => { if (this.properties[propertyName]) { - if (this.properties[propertyName].readOnly && this.properties[propertyName].readOnly === true) { + // readOnly check skipped so far, see https://github.com/eclipse/thingweb.node-wot/issues/333#issuecomment-724583234 + /* if (this.properties[propertyName].readOnly && this.properties[propertyName].readOnly === true) { reject(new Error(`ExposedThing '${this.title}', property '${propertyName}' is readOnly`)); - } + } */ let ps: PropertyState = this.properties[propertyName].getState(); diff --git a/packages/core/test/ServerTest.ts b/packages/core/test/ServerTest.ts index 381c0782c..e42b5d994 100644 --- a/packages/core/test/ServerTest.ts +++ b/packages/core/test/ServerTest.ts @@ -145,7 +145,8 @@ class WoTServerTest { } } - @test async "should not be able to read property with writeOnly"() { + // skipped so far, see https://github.com/eclipse/thingweb.node-wot/issues/333#issuecomment-724583234 + @test.skip async "should not be able to read property with writeOnly"() { let thing = await WoTServerTest.WoT.produce({ title: "ThingWithWriteOnly", properties: { @@ -169,7 +170,8 @@ class WoTServerTest { } } - @test async "should not be able to write property with readOnly"() { + // skipped so far, see https://github.com/eclipse/thingweb.node-wot/issues/333#issuecomment-724583234 + @test.skip async "should not be able to write property with readOnly"() { let thing = await WoTServerTest.WoT.produce({ title: "ThingWithReadOnly", properties: {