From bb9bed9cdef1eda1cc017f46c9ded394da3198fe Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Fri, 6 Oct 2023 09:30:58 +0200 Subject: [PATCH] extend ACL test case --- tests/functions/ACL.cfc | 1 + tests/functions/S3GetMetadata.cfc | 11 +++++++++++ tests/functions/StoreGetMetaData.cfc | 1 - 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/functions/ACL.cfc b/tests/functions/ACL.cfc index 9146875..63a12c8 100644 --- a/tests/functions/ACL.cfc +++ b/tests/functions/ACL.cfc @@ -291,6 +291,7 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" { arr=[{'group':"authenticated",'permission':"WRITE"}]; if(useS3Function) { S3AddACL(arguments.bucketName,isEmpty(arguments.objectName)?"":arguments.objectName,arr); + S3AddACL(path:dir,acl:arr); } else { StoreAddACL(dir,arr); diff --git a/tests/functions/S3GetMetadata.cfc b/tests/functions/S3GetMetadata.cfc index 0b82b58..ef895e5 100644 --- a/tests/functions/S3GetMetadata.cfc +++ b/tests/functions/S3GetMetadata.cfc @@ -26,6 +26,7 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" { // create variables var bucketName=cred.PREFIX&"-get-metadata"&listFirst(replace(server.lucee.version,".","","all"),"-"); var objectName="sub/test.txt"; + var path="s3:///#bucketName#/#objectName#"; Util::deleteIfExists(cred,bucketName,objectName); @@ -46,6 +47,16 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" { assertEquals(bucketName, meta.bucketName); assertEquals(objectName, meta.objectName); + + var meta=S3GetMetadata( + path:path + accessKeyId:cred.ACCESS_KEY_ID, secretAccessKey:cred.SECRET_KEY, host:(isNull(cred.HOST)?nullvalue():cred.HOST)); + + assertEquals(bucketName, meta.bucketName); + assertEquals(objectName, meta.objectName); + + + } catch(e) { if(!findNoCase("Transaction cap exceeded", e.message) ) throw e; diff --git a/tests/functions/StoreGetMetaData.cfc b/tests/functions/StoreGetMetaData.cfc index 4596db5..2e73e7e 100644 --- a/tests/functions/StoreGetMetaData.cfc +++ b/tests/functions/StoreGetMetaData.cfc @@ -1,7 +1,6 @@