Skip to content

Commit

Permalink
extend ACL test case
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Oct 6, 2023
1 parent d9937a7 commit bb9bed9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/functions/ACL.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
11 changes: 11 additions & 0 deletions tests/functions/S3GetMetadata.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
Expand Down
1 change: 0 additions & 1 deletion tests/functions/StoreGetMetaData.cfc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!---
*
* Copyright (c) 2015, Lucee Assosication Switzerland. All rights reserved.
* Copyright (c) 2014, the Railo Company LLC. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down

0 comments on commit bb9bed9

Please sign in to comment.