This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 451286bcd feat(bindings/nodejs): Implement presign test (#2969)
451286bcd is described below
commit 451286bcda3a68fcc90efa0f64a75eabb8d05012
Author: Suyan <[email protected]>
AuthorDate: Tue Aug 29 17:25:37 2023 +0800
feat(bindings/nodejs): Implement presign test (#2969)
feat(bindings/nodejs): pass presign test
Signed-off-by: suyanhanx <[email protected]>
---
bindings/nodejs/tests/binding.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/bindings/nodejs/tests/binding.js b/bindings/nodejs/tests/binding.js
index a53a4bebe..b7e276af0 100644
--- a/bindings/nodejs/tests/binding.js
+++ b/bindings/nodejs/tests/binding.js
@@ -75,6 +75,12 @@ Then('The async file {string} must have content {string}',
async function (path,
assert(bs.toString() == content)
})
-Then('The presign operation should success or raise exception Unsupported',
function () {
- // TODO: please implement me.
+Then('The presign operation should success or raise exception Unsupported',
async function () {
+ try {
+ await this.op.presignStat('path', 1000)
+ await this.op.presignRead('path', 1000)
+ await this.op.presignWrite('path', 1000)
+ } catch (e) {
+ assert.ok(e.message.includes('Unsupported'))
+ }
})