Skip to content

Commit

Permalink
use script-runner .CFconfig.json
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jun 11, 2024
1 parent a760bd9 commit 3bbe9d2
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/coldbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
with:
repository: ColdBox/coldbox-platform
path: src
- name: Copy custom test runner tweaks
run: |
cp _custom/custom/coldbox/.CFconfig.json .
rm -rf _custom
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/masaCMS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
path: _custom
- name: Copy custom test runner tweaks
run: |
cp _custom/custom/masacms/.CFconfig.json .
cp -R _custom/custom/masacms/core/tests/* core/tests
mkdir plugins
cp _custom/custom/masacms/plugins/* plugins
Expand Down
15 changes: 15 additions & 0 deletions custom/coldbox/.CFconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"datasources": {
"coolblog" : {
"host":"localhost",
"type": "MySQL",
"dsn": "jdbc:mysql://{host}:{port}/{database}",
"class": "com.mysql.cj.jdbc.Driver",
"database": "coolblog",
"port": "3306",
"username": "coldbox",
"password": "coldbox"
}
}
}

15 changes: 15 additions & 0 deletions custom/masacms/.CFconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"datasources": {
"masacms" : {
"host":"localhost",
"type": "MySQL",
"dsn": "jdbc:mysql://{host}:{port}/{database}",
"class": "com.mysql.cj.jdbc.Driver",
"database": "masacms",
"port": "3306",
"username": "masacms",
"password": "masacms"
}
}
}

15 changes: 8 additions & 7 deletions custom/presidecms/tests/runtests.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
scope = url.scope ?: "full";
directory = url.directory ?: "";
configImport(
type: "server",
data: deserializeJSON(fileRead(expandpath(".cfconfig.json"))),
password="admin"
);
if (fileExists(expandpath(".cfconfig.json"))){
configImport(
type: "server",
data: deserializeJSON(fileRead(expandpath(".cfconfig.json"))),
password="admin"
);
}
testbox = new testbox.system.TestBox( options={}, reporter=reporter, directory={
recurse = true
, mapping = Len( directory ) ? "unit.api.#directory#" : "unit"
, mapping = Len( directory ) ? directory : "unit"
, filter = function( required path ){
if ( scope=="quick" ) {
var excludes = [
Expand Down

0 comments on commit 3bbe9d2

Please sign in to comment.