Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/technologies/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ const results = []
// Loop through each line and parse it as JSON and check if it is a result line
lines.forEach(line => {
const output = JSON.parse(line).Output?.trim()
const valid = output.includes('PASS') || output.includes('FAIL')
if (output === undefined) return
const valid = output.includes("--- PASS") || output.includes("--- FAIL")
if(!valid) return

const passed = output.includes('PASS')
const passed = output.includes('--- PASS')

// Add the pass/fail status to the array
results.push(passed)
Expand All @@ -103,6 +104,9 @@ lines.forEach(line => {
fs.writeFileSync(process.env.UNIT_TEST_OUTPUT_FILE, JSON.stringify(results))
EOF

# removing mod.go before testing the result because if it fails we don't need to remove go.mod manually
rm go.mod

# process results
node processGoResults.js

Expand Down