Skip to content

Commit 81c6c9e

Browse files
authored
fix: support read only root filesystem (#36)
1 parent 44e6c03 commit 81c6c9e

File tree

6 files changed

+7
-3
lines changed

6 files changed

+7
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Options:
8686
--report-format <reportFormat> default: "json" --- supported formats: "json", "html", "printhtml"
8787
--report-auto-filename-enable <reportAutoFilenameEnable> default: false, if true the file name will be generated by the backend
8888
--report-target <reportTarget> default: "file://<file_name_generated_by_backend>" --- supported targets: "file://path_to_file", "s3://<bucket_name>[/<file_path>]"
89+
--report-folder <reportFolder> save report in the specified folder, default: "current working directory"
8990
--slack-webhook-url <slackWebhookUrl> default: "Disabled" --- supported formats: "https://....."
9091
-h, --help output usage information
9192

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mojaloop/ml-testing-toolkit-client-lib",
33
"description": "Testing Toolkit Client Library",
4-
"version": "1.10.2",
4+
"version": "1.10.3-rorfs.0",
55
"license": "Apache-2.0",
66
"author": "Vijaya Kumar Guthi, ModusBox Inc. ",
77
"contributors": [

src/client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ program
4646
.option('--report-format <reportFormat>', 'default: "none" --- supported formats: "none", "json", "html", "printhtml"')
4747
.option('--report-auto-filename-enable <reportAutoFilenameEnable>', 'default: false, if true the file name will be generated by the backend')
4848
.option('--report-target <reportTarget>', 'default: "file://<file_name_genrated_by_backend>" --- supported targets: "file://path_to_file", "s3://<bucket_name>[/<file_path>]"')
49+
.option('--report-folder <reportFolder>', 'save report in the specified folder, default: "current working directory"')
4950
.option('--slack-webhook-url <slackWebhookUrl>', 'default: "Disabled" --- supported formats: "https://....."')
5051
.option('--slack-webhook-url-for-failed <slackWebhookUrl>', 'default: "Disabled" --- supported formats: "https://....."')
5152
.option('--extra-summary-information <Comma separated values in the format key:value>', 'default: none --- example: "Testcase Name:something,Environment:Dev1"')

src/router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const cli = (commanderOptions) => {
6262
reportFormat: commanderOptions.reportFormat || configFile.reportFormat,
6363
reportAutoFilenameEnable: commanderOptions.reportAutoFilenameEnable === 'true' || configFile.reportAutoFilenameEnable === true,
6464
reportTarget: commanderOptions.reportTarget || configFile.reportTarget,
65+
reportFolder: commanderOptions.reportFolder || configFile.reportFolder,
6566
slackWebhookUrl: commanderOptions.slackWebhookUrl || configFile.slackWebhookUrl,
6667
slackWebhookUrlForFailed: commanderOptions.slackWebhookUrlForFailed || configFile.slackWebhookUrlForFailed,
6768
slackPassedImage: configFile.slackPassedImage,

src/utils/report.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ const report = async (data, reportType) => {
112112
}
113113
} else {
114114
// Store the file
115+
reportFilename = `${config.reportFolder || '.'}/${reportFilename}`
115116
const writeFileAsync = promisify(fs.writeFile)
116117
await writeFileAsync(reportFilename, reportData)
117118
console.log(`${reportFilename} was generated`)

0 commit comments

Comments
 (0)