Skip to content

Commit

Permalink
fixed summary
Browse files Browse the repository at this point in the history
  • Loading branch information
raianand committed Feb 14, 2024
1 parent 8f4b5be commit 0ee7fd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions src/summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const fs = require('fs')

async function generateTestResults() {
// Specify the path to your file
exec('sudo cp /home/mitmproxyuser/output.log output.log')
exec('sudo chown -R $USER:$USER output.log')
await exec('sudo cp /home/mitmproxyuser/output.log output.log')
await exec('sudo chown -R $USER:$USER output.log')
const filePath = 'output.log'

try {
Expand All @@ -30,6 +30,7 @@ async function generateTestResults() {
return jsonArray
} catch (error) {
console.error(`Error reading file: ${error.message}`)
return []
}
}

Expand All @@ -54,9 +55,6 @@ function getUniqueBy(arr, keys) {
}

async function summary() {
await exec('sudo cat /home/mitmproxyuser/bolt.log')
await exec('sudo cat /home/mitmproxyuser/bolt-error.log')
await exec('sudo systemctl status bolt')
const results = await generateTestResults()
const uniqueResults = getUniqueBy(results, ['domain', 'scheme']).map(
result => [
Expand Down

0 comments on commit 0ee7fd4

Please sign in to comment.