Harden diagnostic handling and warning presentation
This commit is contained in:
@@ -590,6 +590,7 @@ func TestRunWarningsRemainSuccessfulAndReachDurableSurfaces(t *testing.T) {
|
||||
roots := newStateTestRoots(t)
|
||||
harness := newStateTestHarness()
|
||||
harness.includeWarnings = true
|
||||
harness.includeWarningFile = true
|
||||
harness.chunkDiagnostics = []contracts.ProducerDiagnostic{stateTestDiagnostic("chunk", "contract-warning", "warning retained")}
|
||||
var stdout, stderr bytes.Buffer
|
||||
code := RunWithOptions([]string{"run", "sample", "--config", roots.config, "--input", roots.input, "--chunk_cache", "bypass", "--debug"}, &stdout, &stderr, harness.options())
|
||||
@@ -601,6 +602,7 @@ func TestRunWarningsRemainSuccessfulAndReachDurableSurfaces(t *testing.T) {
|
||||
if err != nil || !strings.Contains(string(output), "contract-warning") {
|
||||
t.Fatalf("durable output = %q, %v", output, err)
|
||||
}
|
||||
assertFile(t, filepath.Join(filepath.Dir(outputPath), "warnings.json"))
|
||||
bundle := onlyChildDir(t, roots.debug)
|
||||
var diagnostics contracts.DiagnosticCollection
|
||||
readStateTestSummaryJSON(t, bundle, "final-diagnostics.json", &diagnostics)
|
||||
|
||||
Reference in New Issue
Block a user