Skip to content

Commit

Permalink
improve cfconfig test
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jun 27, 2024
1 parent 5f7fc5c commit 369982a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
4 changes: 3 additions & 1 deletion custom/default-cfconfig/.CFConfig-empty.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
"mode":"single"
}
25 changes: 22 additions & 3 deletions custom/default-cfconfig/compareDefault.cfm
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
<cfscript>
default = deserializeJSON( fileRead( expandPath( "./.CFConfig-default.json" ) ) );
contextFiles = directoryList( path=Expandpath( "{lucee-config}" ), recurse=true );
for ( cf in contextFiles )
systemOutput( cf, true );
empty = deserializeJSON( fileRead( expandPath( '{lucee-config}.CFConfig.json' ) ) );
cfgPAth = expandPath( '{lucee-config}.CFConfig.json' );
if ( !fileExists( cfgPath ) ){
for ( cf in contextFiles ) {
systemOutput( cf, true );
}
log = expandPath( '{lucee-config}/logs/out.log' );
if ( !fileExists( log ) ){
systemOutput( "" ):
systemOutput( "--------- out.log-----------" ):
systemOutput( fileRead( log ) ):
}
errlog = expandPath( '{lucee-config}/logs/err.log' );
if ( !fileExists( errlog ) ){
systemOutput( "" ):
systemOutput( "--------- err.log-----------" ):
systemOutput( fileRead( errlog ) ):
}
throw "missing .CFConfig.json [#cfgPath#]";
}
empty = deserializeJSON( fileRead( cfgPath ) );
ignore = [ "salt", "hspw" ];
problems = 0;
Expand Down

0 comments on commit 369982a

Please sign in to comment.