testaro 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1069,7 +1069,7 @@ const doActs = async (report, actIndex, page) => {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
};
|
|
1071
1071
|
// Performs the commands in a script and returns a report.
|
|
1072
|
-
const doScript = async report => {
|
|
1072
|
+
const doScript = async (options, report) => {
|
|
1073
1073
|
// Reinitialize the log statistics.
|
|
1074
1074
|
logCount = logSize = prohibitedCount = visitTimeoutCount = visitRejectionCount= 0;
|
|
1075
1075
|
// Add initialized properties to the report.
|
|
@@ -1105,6 +1105,8 @@ const doScript = async report => {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
|
+
// Add the report to the reports array.
|
|
1109
|
+
options.reports.push(report);
|
|
1108
1110
|
};
|
|
1109
1111
|
// Recursively performs commands on the hosts of a batch.
|
|
1110
1112
|
const doBatch = async (options, reportTemplate, hostIndex = 0) => {
|
|
@@ -1122,7 +1124,7 @@ const doBatch = async (options, reportTemplate, hostIndex = 0) => {
|
|
|
1122
1124
|
}
|
|
1123
1125
|
});
|
|
1124
1126
|
// Perform the commands on the host.
|
|
1125
|
-
await doScript(hostReport);
|
|
1127
|
+
await doScript(options, hostReport);
|
|
1126
1128
|
// Process the remaining hosts.
|
|
1127
1129
|
await doBatch(options, reportTemplate, hostIndex + 1);
|
|
1128
1130
|
}
|
|
@@ -1139,7 +1141,7 @@ const doScriptOrBatch = async (options, reportTemplate) => {
|
|
|
1139
1141
|
else {
|
|
1140
1142
|
// Perform the script.
|
|
1141
1143
|
console.log('Starting no-batch script');
|
|
1142
|
-
await doScript(reportTemplate);
|
|
1144
|
+
await doScript(options, reportTemplate);
|
|
1143
1145
|
}
|
|
1144
1146
|
// Add an end time to the log.
|
|
1145
1147
|
options.log.push({
|