-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport of [ui, tests] Various acceptance test fixups (v main) into …
…release/1.9.x (#25177) * no-op commit due to failed cherry-picking * [ui, ci] retain artifacts from test runs including test timing (#24555) * retain artifacts from test runs including test timing * Pinning commit hashes for action helpers * trigger for ui-test run * Trying to isolate down to a simple upload * Once more with mkdir * What if we just wrote our own test reporter tho * Let the partitioned runs handle placement * Filter out common token logs, add a summary at the end, and note failures in logtime * Custom reporter cannot also have an output file, he finds out two days late * Aggregate summary, duration, and removing failure case * Conditional test report generation * Timeouts are errors * Trying with un-partitioned input json file * Remove the commented-out lines for main-only runs * combine-ui-test-results as its own script * Remove the Ember Test Audit workflow (#24637) * [ui, tests] Various acceptance test fixups (v main) (#25031) * Add factory hooks for jobs to have previously stable versions and stopped status * Since #24973 node-read isn't presupposed and so should regex match only on the common url parts * Job detail tests for title buttons are now bimodal and default to having previously-stable version in history * prettier plz * Breaking a thing on purpose to see if my other broken thing is broken * continue-on-error set to false to get things red when appropriate * OK what if continue-on-error=true but we do a separate failure reporting after the fact * fail-fast are you the magic incantation that I need? * Re-fix my test now that fast-fail is off * Fix to server-leader by adding a region first, and always()-append to uploading partition results * Express failure step lists failing tests so you don't have to click back into ember-exam step * temporary snapshot and logging for flakey test in service job detail * Bunch of region and tasklogs test fixups * using allocStatusDistribution to ensure service job always has a non-queued alloc * Manually remove ember test audit (re-do #24637) --------- Co-authored-by: temp <[email protected]> Co-authored-by: Phil Renaud <[email protected]> Co-authored-by: Phil Renaud <[email protected]>
- Loading branch information
1 parent
1c707b0
commit 6cfbf44
Showing
15 changed files
with
371 additions
and
108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/env node | ||
/** | ||
* Copyright (c) HashiCorp, Inc. | ||
* SPDX-License-Identifier: BUSL-1.1 | ||
*/ | ||
|
||
'use strict'; | ||
const fs = require('fs'); | ||
|
||
const NUM_PARTITIONS = 4; | ||
|
||
function combineResults() { | ||
const results = []; | ||
let duration = 0; | ||
let aggregateSummary = { total: 0, passed: 0, failed: 0 }; | ||
|
||
for (let i = 1; i <= NUM_PARTITIONS; i++) { | ||
try { | ||
const data = JSON.parse( | ||
fs.readFileSync(`../test-results/test-results-${i}/test-results.json`).toString() | ||
); | ||
results.push(...data.tests); | ||
duration += data.duration; | ||
aggregateSummary.total += data.summary.total; | ||
aggregateSummary.passed += data.summary.passed; | ||
aggregateSummary.failed += data.summary.failed; | ||
} catch (err) { | ||
console.error(`Error reading partition ${i}:`, err); | ||
} | ||
} | ||
|
||
const output = { | ||
timestamp: new Date().toISOString(), | ||
sha: process.env.GITHUB_SHA, | ||
summary: { | ||
total: aggregateSummary.total, | ||
passed: aggregateSummary.passed, | ||
failed: aggregateSummary.failed | ||
}, | ||
duration, | ||
tests: results | ||
}; | ||
|
||
fs.writeFileSync('../ui/combined-test-results.json', JSON.stringify(output, null, 2)); | ||
} | ||
|
||
if (require.main === module) { | ||
combineResults(); | ||
} | ||
|
||
module.exports = combineResults; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.