Skip to content

Commit

Permalink
split up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Oct 4, 2023
1 parent 296d47a commit 947d984
Showing 1 changed file with 48 additions and 20 deletions.
68 changes: 48 additions & 20 deletions tests/functions/ACL.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,69 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" {

function run( testResults , testBox ) {
describe( title="Test suite for ACL funcions", body=function() {
it(title="check region with blackbaze",skip=Util::isBackBlazeNotSupported(), body = function( currentSpec ) {
//testit(Util::getBackBlazeCredentials());
});
/*it(title="check region with blackbaze",skip=Util::isBackBlazeNotSupported(), body = function( currentSpec ) {
testit(Util::getBackBlazeCredentials());
}); */

it(title="check with amazon",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
/*it(title="check with amazon",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
testit(Util::getAWSCredentials());
});
});*/

it(title="check with wasabi",skip=Util::isWasabiNotSupported(), body = function( currentSpec ) {
//testit(Util::getWasabiCredentials());
});
/*it(title="check with wasabi",skip=Util::isWasabiNotSupported(), body = function( currentSpec ) {
testit(Util::getWasabiCredentials());
});*/

it(title="check with google",skip=Util::isGoogleNotSupported(), body = function( currentSpec ) {
//testit(Util::getGoogleCredentials());
});
/*it(title="check with google",skip=Util::isGoogleNotSupported(), body = function( currentSpec ) {
testit(Util::getGoogleCredentials());
});*/

// AWS
it(title="check with amazon add acl for bucket store style",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
var cred=Util::getAWSCredentials();
setup(cred)
testStoreAddACLBucketStore(cred);
});

it(title="check with amazon add acl for bucket s3 style",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
var cred=Util::getAWSCredentials();
setup(cred)
testStoreAddACLBucketS3(cred);
});

it(title="check with amazon set acl for bucket store style",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
var cred=Util::getAWSCredentials();
setup(cred)
testStoreSetACLBucketStore(cred);
});

it(title="check with amazon set acl for bucket s3 style",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
var cred=Util::getAWSCredentials();
setup(cred)
testStoreSetACLBucketS3(cred);
});

it(title="check with amazon add acl for object store style",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
var cred=Util::getAWSCredentials();
setup(cred)
testStoreAddACLObjectStore(cred);
});

it(title="check with amazon add acl for object s3 style",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
var cred=Util::getAWSCredentials();
setup(cred)
testStoreAddACLObjectS3(cred);
});
});
}

private function testit(cred) {

private function setup(cred) {
if(!isNull(cred.ACCESS_KEY_ID)) {
application action="update" s3={
accessKeyId: cred.ACCESS_KEY_ID,
awsSecretKey: cred.SECRET_KEY,
host:isNull(cred.HOST)?nullValue(): cred.HOST
};
}

testStoreAddACLBucketStore(cred);
testStoreAddACLBucketS3(cred);
testStoreSetACLBucketStore(cred);
testStoreSetACLBucketS3(cred);
testStoreAddACLObjectStore(cred);
testStoreAddACLObjectS3(cred);
}

private function testStoreAddACLBucketStore(cred) localMode=true {
Expand Down

0 comments on commit 947d984

Please sign in to comment.