Skip to content

Commit

Permalink
add bucket in test case
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Nov 13, 2023
1 parent 8b8b57b commit a19cc0b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/vfs/WriteAndAdd.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" {

function run( testResults , testBox ) {
describe( title="Test suite to compare the VFS against the direct approch vs HTTP (if possible)", body=function() {
describe( title="Test suite to test VFS fileWrite and FileAppend", body=function() {

// FileExists vs S3Exists
it(title="check FileExists vs S3Exists with AWS",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
it(title="check with AWS",skip=Util::isAWSNotSupported(), body = function( currentSpec ) {
testS3ExistsVsFileExists(Util::getAWSCredentials());
});
it(title="check FileExists vs S3Exists with Blackbaze",skip=Util::isBackBlazeNotSupported(), body = function( currentSpec ) {
it(title="check with Blackbaze",skip=Util::isBackBlazeNotSupported(), body = function( currentSpec ) {
testS3ExistsVsFileExists(Util::getBackBlazeCredentials());
});
it(title="check FileExists vs S3Exists with Google",skip=Util::isGoogleNotSupported(), body = function( currentSpec ) {
it(title="check with Google",skip=Util::isGoogleNotSupported(), body = function( currentSpec ) {
testS3ExistsVsFileExists(Util::getGoogleCredentials());
});
it(title="check FileExists vs S3Exists with Wasabi",skip=Util::isWasabiNotSupported(), body = function( currentSpec ) {
it(title="check with Wasabi",skip=Util::isWasabiNotSupported(), body = function( currentSpec ) {
testS3ExistsVsFileExists(Util::getWasabiCredentials());
});

Expand All @@ -58,6 +58,7 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" {
var path="s3://#bucketName#/#objectName#";
var pathWithCred="s3://#cred.ACCESS_KEY_ID#:#cred.SECRET_KEY#@";
if(!isNull(cred.HOST)) pathWithCred&=cred.HOST;
parentPathWithCred&="/#bucketName#/";
pathWithCred&="/#bucketName#/#objectName#";

var phrase1="Just some content.";
Expand All @@ -69,6 +70,9 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" {
// does not exists yet (direct approach with explicit credentials)
assertFalse(fileExists(pathWithCred));

directoryCreate(parentPathWithCred);


// write
fileWrite(pathWithCred,phrase1);
assertTrue(fileExists(pathWithCred),path);
Expand Down

0 comments on commit a19cc0b

Please sign in to comment.