Skip to content

Commit

Permalink
extend test case
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Aug 17, 2023
1 parent e3fafa5 commit 95e5dad
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion tests/functions/S3Copy.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" {
describe( title="Test suite for S3Copy()", body=function() {
it(title="check region with blackbaze",skip=isBackBlazeNotSupported(), body = function( currentSpec ) {
var cred=getBackBlazeCredentials();
throw serialize(cred.HOST);

// create variables
var srcBucketName=cred.PREFIX&"src-filecopy";
var trgBucketName=cred.PREFIX&"trg-filecopy";
Expand All @@ -28,6 +28,36 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" {



//assertEquals("http://bundle-download.s3.eu-west-1.amazonaws.com/sentry-log4j-1.7.22.jar", res);
});

it(title="check region with amazon",skip=isNotSupported(), body = function( currentSpec ) {
var cred=getCredentials();

// create variables
var srcBucketName=cred.PREFIX&"src-filecopy";
var trgBucketName=cred.PREFIX&"trg-filecopy";
var srcObjectName="src/test.txt";
var trgObjectName="trg/test.txt";

// create source bucket
if(!S3Exists(
bucketName:srcBucketName, objectName:srcObjectName,
accessKeyId:cred.ACCESS_KEY_ID, secretAccessKey:cred.SECRET_KEY)) {
S3Write(
location:"us-east-1",
value:"Susi Sorglos",
bucketName:srcBucketName, objectName:srcObjectName,
accessKeyId:cred.ACCESS_KEY_ID, secretAccessKey:cred.SECRET_KEY);
}
// copy
S3Copy(
location:"us-east-1",
srcBucketName:srcBucketName, srcObjectName:srcObjectName, trgBucketName:trgBucketName, trgObjectName:trgObjectName,
accessKeyId:cred.ACCESS_KEY_ID, secretAccessKey:cred.SECRET_KEY);



//assertEquals("http://bundle-download.s3.eu-west-1.amazonaws.com/sentry-log4j-1.7.22.jar", res);
});

Expand Down

0 comments on commit 95e5dad

Please sign in to comment.