Skip to content

Commit a68d22a

Browse files
simplify test table options and update golden files
1 parent b38e838 commit a68d22a

File tree

5 files changed

+4
-142
lines changed

5 files changed

+4
-142
lines changed

tests/failed_test.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,10 @@ func TestFailedTestsTable(t *testing.T) {
3333
buf := bytes.NewBuffer(nil)
3434
inputFile := filepath.Join(base, tc.fileName+".jsonl")
3535
options := app.Options{
36-
FileName: inputFile,
37-
Output: buf,
38-
Sorter: parse.SortByPackageName,
39-
TestTableOptions: app.TestTableOptions{
40-
Pass: true, // Enable test table output
41-
Skip: true, // Also show skipped tests
42-
},
36+
FileName: inputFile,
37+
Output: buf,
38+
Sorter: parse.SortByPackageName,
39+
TestTableOptions: app.TestTableOptions{},
4340
}
4441
gotExitCode, err := app.Run(options)
4542
require.NoError(t, err)

tests/testdata/failed/test_01.golden

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
╭────────┬─────────┬───────────────────────────────────────┬───────────────────────────────────────╮
2-
│ Status │ Elapsed │ Test │ Package │
3-
├────────┼─────────┼───────────────────────────────────────┼───────────────────────────────────────┤
4-
│ PASS │ 5.45 │ TestMigrateUpWithReset │ github.com/pressly/goose/v3/tests/e2e │
5-
│ PASS │ 5.39 │ TestMigrateUpTo │ github.com/pressly/goose/v3/tests/e2e │
6-
│ PASS │ 4.96 │ TestMigrateUpByOne │ github.com/pressly/goose/v3/tests/e2e │
7-
│ PASS │ 3.37 │ TestMigrateFull │ github.com/pressly/goose/v3/tests/e2e │
8-
│ PASS │ 2.53 │ TestMigrateUpWithRedo │ github.com/pressly/goose/v3/tests/e2e │
9-
│ PASS │ 2.32 │ TestNoVersioning │ github.com/pressly/goose/v3/tests/e2e │
10-
│ PASS │ 0.02 │ TestNoVersioning/seed-up-down-to-zero │ github.com/pressly/goose/v3/tests/e2e │
11-
│ PASS │ 0.02 │ TestNoVersioning/test-seed-up-reset │ github.com/pressly/goose/v3/tests/e2e │
12-
│ PASS │ 0.01 │ TestNoVersioning/test-seed-up-redo │ github.com/pressly/goose/v3/tests/e2e │
13-
│ FAIL │ 3.71 │ TestNotAllowMissing │ github.com/pressly/goose/v3/tests/e2e │
14-
│ FAIL │ 2.55 │ TestAllowMissingUpWithRedo │ github.com/pressly/goose/v3/tests/e2e │
15-
│ FAIL │ 3.16 │ TestNowAllowMissingUpByOne │ github.com/pressly/goose/v3/tests/e2e │
16-
│ FAIL │ 4.13 │ TestAllowMissingUpWithReset │ github.com/pressly/goose/v3/tests/e2e │
17-
│ FAIL │ 3.15 │ TestAllowMissingUpByOne │ github.com/pressly/goose/v3/tests/e2e │
18-
│ FAIL │ 5.11 │ TestMigrateAllowMissingDown │ github.com/pressly/goose/v3/tests/e2e │
19-
╰────────┴─────────┴───────────────────────────────────────┴───────────────────────────────────────╯
201
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
212
┃ FAIL package: github.com/pressly/goose/v3/tests/e2e ┃
223
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

tests/testdata/failed/test_02.golden

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
╭────────┬─────────┬──────────────┬──────────────────────────────────────╮
2-
│ Status │ Elapsed │ Test │ Package │
3-
├────────┼─────────┼──────────────┼──────────────────────────────────────┤
4-
│ FAIL │ 1.00 │ TestWhatever │ github.com/mfridman/debug-go/testing │
5-
╰────────┴─────────┴──────────────┴──────────────────────────────────────╯
61
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
72
┃ FAIL package: github.com/mfridman/debug-go/testing ┃
83
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

tests/testdata/failed/test_03.golden

Lines changed: 0 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,3 @@
1-
╭────────┬─────────┬─────────────────────────────────┬──────────────────────────────────╮
2-
│ Status │ Elapsed │ Test │ Package │
3-
├────────┼─────────┼─────────────────────────────────┼──────────────────────────────────┤
4-
│ PASS │ 0.02 │ TestMetrics │ github.com/mfridman/tparse/parse │
5-
│ PASS │ 0.01 │ TestBigOutcome │ github.com/mfridman/tparse/parse │
6-
│ PASS │ 0.01 │ TestPackageCache │ github.com/mfridman/tparse/parse │
7-
│ PASS │ 0.01 │ TestPackageCover │ github.com/mfridman/tparse/parse │
8-
│ PASS │ 0.00 │ TestNewEvent │ github.com/mfridman/tparse/parse │
9-
│ PASS │ 0.00 │ TestCachedEvent │ github.com/mfridman/tparse/parse │
10-
│ PASS │ 0.00 │ TestCoverEvent │ github.com/mfridman/tparse/parse │
11-
│ PASS │ 0.00 │ TestNoTestFiles │ github.com/mfridman/tparse/parse │
12-
│ PASS │ 0.00 │ TestNoTestsToRun │ github.com/mfridman/tparse/parse │
13-
│ PASS │ 0.00 │ TestNoTestsWarn │ github.com/mfridman/tparse/parse │
14-
│ PASS │ 0.00 │ TestActionString │ github.com/mfridman/tparse/parse │
15-
│ PASS │ 0.00 │ TestElapsed │ github.com/mfridman/tparse/parse │
16-
│ PASS │ 0.00 │ TestPanic │ github.com/mfridman/tparse/parse │
17-
│ PASS │ 0.00 │ TestSingleTestFailStack │ github.com/mfridman/tparse/parse │
18-
│ PASS │ 0.00 │ TestBigOutcome/input01.json │ github.com/mfridman/tparse/parse │
19-
│ PASS │ 0.00 │ TestPanic/input01.json │ github.com/mfridman/tparse/parse │
20-
│ PASS │ 0.00 │ TestPanic/input02.json │ github.com/mfridman/tparse/parse │
21-
│ PASS │ 0.00 │ TestPanic/input03.json │ github.com/mfridman/tparse/parse │
22-
│ PASS │ 0.00 │ TestPanic/input04.json │ github.com/mfridman/tparse/parse │
23-
│ PASS │ 0.00 │ TestPanic/input05.json │ github.com/mfridman/tparse/parse │
24-
│ PASS │ 0.00 │ TestNoTestFiles/event_0 │ github.com/mfridman/tparse/parse │
25-
│ PASS │ 0.00 │ TestNoTestFiles/event_1 │ github.com/mfridman/tparse/parse │
26-
│ PASS │ 0.00 │ TestSingleTestFailStack/input01 │ github.com/mfridman/tparse/parse │
27-
│ PASS │ 0.00 │ TestPrescan/input01.txt │ github.com/mfridman/tparse/parse │
28-
│ PASS │ 0.00 │ TestPrescan/input04.txt │ github.com/mfridman/tparse/parse │
29-
│ PASS │ 0.00 │ TestNoTestFiles/event_2 │ github.com/mfridman/tparse/parse │
30-
│ PASS │ 0.00 │ TestNoTestsToRun/event_0 │ github.com/mfridman/tparse/parse │
31-
│ PASS │ 0.00 │ TestBigOutcome/input02.json │ github.com/mfridman/tparse/parse │
32-
│ PASS │ 0.00 │ TestSingleTestFailStack/input02 │ github.com/mfridman/tparse/parse │
33-
│ PASS │ 0.00 │ TestNoTestFiles/event_3 │ github.com/mfridman/tparse/parse │
34-
│ PASS │ 0.00 │ TestCachedEvent/event_0 │ github.com/mfridman/tparse/parse │
35-
│ PASS │ 0.00 │ TestCachedEvent/event_1 │ github.com/mfridman/tparse/parse │
36-
│ PASS │ 0.00 │ TestCachedEvent/event_2 │ github.com/mfridman/tparse/parse │
37-
│ PASS │ 0.00 │ TestCachedEvent/event_3 │ github.com/mfridman/tparse/parse │
38-
│ PASS │ 0.00 │ TestNoTestsWarn/event_0 │ github.com/mfridman/tparse/parse │
39-
│ PASS │ 0.00 │ TestSingleTestFailStack/input03 │ github.com/mfridman/tparse/parse │
40-
│ PASS │ 0.00 │ TestCachedEvent/event_4 │ github.com/mfridman/tparse/parse │
41-
│ PASS │ 0.00 │ TestNoTestsToRun/event_1 │ github.com/mfridman/tparse/parse │
42-
│ PASS │ 0.00 │ TestNoTestsToRun/event_2 │ github.com/mfridman/tparse/parse │
43-
│ PASS │ 0.00 │ TestNoTestsWarn/event_1 │ github.com/mfridman/tparse/parse │
44-
│ PASS │ 0.00 │ TestNoTestsToRun/event_3 │ github.com/mfridman/tparse/parse │
45-
│ PASS │ 0.00 │ TestSingleTestFailStack/input04 │ github.com/mfridman/tparse/parse │
46-
│ PASS │ 0.00 │ TestCoverEvent/event_0 │ github.com/mfridman/tparse/parse │
47-
│ PASS │ 0.00 │ TestNoTestsWarn/event_2 │ github.com/mfridman/tparse/parse │
48-
│ PASS │ 0.00 │ TestCoverEvent/event_1 │ github.com/mfridman/tparse/parse │
49-
│ PASS │ 0.00 │ TestNoTestsWarn/event_3 │ github.com/mfridman/tparse/parse │
50-
│ PASS │ 0.00 │ TestCoverEvent/event_2 │ github.com/mfridman/tparse/parse │
51-
│ PASS │ 0.00 │ TestCoverEvent/event_3 │ github.com/mfridman/tparse/parse │
52-
│ PASS │ 0.00 │ TestBigOutcome/input03.json │ github.com/mfridman/tparse/parse │
53-
│ PASS │ 0.00 │ TestCoverEvent/event_4 │ github.com/mfridman/tparse/parse │
54-
│ PASS │ 0.00 │ TestNewEvent/event_0 │ github.com/mfridman/tparse/parse │
55-
│ PASS │ 0.00 │ TestCoverEvent/event_5 │ github.com/mfridman/tparse/parse │
56-
│ PASS │ 0.00 │ TestNewEvent/event_1 │ github.com/mfridman/tparse/parse │
57-
│ PASS │ 0.00 │ TestNewEvent/event_2 │ github.com/mfridman/tparse/parse │
58-
│ PASS │ 0.00 │ TestSingleTestFailStack/input05 │ github.com/mfridman/tparse/parse │
59-
│ PASS │ 0.00 │ TestNewEvent/event_3 │ github.com/mfridman/tparse/parse │
60-
│ PASS │ 0.00 │ TestNewEvent/event_4 │ github.com/mfridman/tparse/parse │
61-
│ PASS │ 0.00 │ TestNewEvent/event_5 │ github.com/mfridman/tparse/parse │
62-
│ PASS │ 0.00 │ TestNewEvent/event_6 │ github.com/mfridman/tparse/parse │
63-
│ PASS │ 0.00 │ TestNewEvent/event_7 │ github.com/mfridman/tparse/parse │
64-
│ PASS │ 0.00 │ TestNewEvent/event_8 │ github.com/mfridman/tparse/parse │
65-
│ PASS │ 0.00 │ TestNewEvent/event_9 │ github.com/mfridman/tparse/parse │
66-
│ PASS │ 0.00 │ TestBigOutcome/input04.json │ github.com/mfridman/tparse/parse │
67-
│ PASS │ 0.00 │ TestBigOutcome/input05.json │ github.com/mfridman/tparse/parse │
68-
│ PASS │ 0.00 │ TestBigOutcome/input06.json │ github.com/mfridman/tparse/parse │
69-
│ PASS │ 0.00 │ TestBigOutcome/input07.json │ github.com/mfridman/tparse/parse │
70-
│ PASS │ 0.00 │ TestBigOutcome/input08.json │ github.com/mfridman/tparse/parse │
71-
│ PASS │ 0.00 │ TestPackageCover/log │ github.com/mfridman/tparse/parse │
72-
│ PASS │ 0.00 │ TestPackageCover/bytes │ github.com/mfridman/tparse/parse │
73-
│ PASS │ 0.00 │ TestPackageCover/sort │ github.com/mfridman/tparse/parse │
74-
│ PASS │ 0.00 │ TestPackageCache/mime │ github.com/mfridman/tparse/parse │
75-
│ PASS │ 0.00 │ TestPackageCache/time │ github.com/mfridman/tparse/parse │
76-
│ PASS │ 0.00 │ TestPackageCache/strings │ github.com/mfridman/tparse/parse │
77-
│ PASS │ 0.00 │ TestPackageCache/fmt │ github.com/mfridman/tparse/parse │
78-
│ PASS │ 0.00 │ TestMetrics/fmt_test │ github.com/mfridman/tparse/parse │
79-
│ PASS │ 0.00 │ TestMetrics/strings_test │ github.com/mfridman/tparse/parse │
80-
│ PASS │ 0.00 │ TestMetrics/bytes_test │ github.com/mfridman/tparse/parse │
81-
│ PASS │ 0.00 │ TestMetrics/bufio_test │ github.com/mfridman/tparse/parse │
82-
│ PASS │ 0.00 │ TestMetrics/crypto_test │ github.com/mfridman/tparse/parse │
83-
│ PASS │ 0.00 │ TestMetrics/log_test │ github.com/mfridman/tparse/parse │
84-
│ PASS │ 0.00 │ TestMetrics/mime_test │ github.com/mfridman/tparse/parse │
85-
│ PASS │ 0.00 │ TestMetrics/sort_test │ github.com/mfridman/tparse/parse │
86-
│ PASS │ 0.00 │ TestMetrics/time_test │ github.com/mfridman/tparse/parse │
87-
│ FAIL │ 0.00 │ TestPrescan │ github.com/mfridman/tparse/parse │
88-
│ FAIL │ 0.00 │ TestRaceReplay │ github.com/mfridman/tparse/parse │
89-
│ FAIL │ 0.00 │ TestRaceReplay/input01 │ github.com/mfridman/tparse/parse │
90-
│ FAIL │ 0.00 │ TestRaceReplay/input02 │ github.com/mfridman/tparse/parse │
91-
│ FAIL │ 0.00 │ TestRaceReplay/input03 │ github.com/mfridman/tparse/parse │
92-
│ FAIL │ 0.00 │ TestPrescan/input02.txt │ github.com/mfridman/tparse/parse │
93-
│ FAIL │ 0.00 │ TestPrescan/input03.txt │ github.com/mfridman/tparse/parse │
94-
│ │ │ │ │
95-
│ PASS │ 0.00 │ TestFollow │ github.com/mfridman/tparse/tests │
96-
│ PASS │ 0.00 │ TestFollow/test_01 │ github.com/mfridman/tparse/tests │
97-
│ PASS │ 0.00 │ TestFollow/test_02 │ github.com/mfridman/tparse/tests │
98-
│ PASS │ 0.00 │ TestFollow/test_03 │ github.com/mfridman/tparse/tests │
99-
│ PASS │ 0.00 │ TestFollow/test_04 │ github.com/mfridman/tparse/tests │
100-
│ PASS │ 0.00 │ TestFollow/test_05 │ github.com/mfridman/tparse/tests │
101-
╰────────┴─────────┴─────────────────────────────────┴──────────────────────────────────╯
1021
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
1032
┃ FAIL package: github.com/mfridman/tparse/parse ┃
1043
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

tests/testdata/failed/test_04.golden

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
╭────────┬─────────┬────────────────────────────────┬────────────────────────╮
2-
│ Status │ Elapsed │ Test │ Package │
3-
├────────┼─────────┼────────────────────────────────┼────────────────────────┤
4-
│ FAIL │ 1.00 │ TestWhatever │ command-line-arguments │
5-
│ FAIL │ 0.00 │ TestWhatever/foo │ command-line-arguments │
6-
│ FAIL │ 0.00 │ TestWhatever/foo/bar │ command-line-arguments │
7-
│ FAIL │ 0.00 │ TestWhatever/foo/baz │ command-line-arguments │
8-
│ FAIL │ 0.00 │ TestWhatever/foo/bar/inner-bar │ command-line-arguments │
9-
│ FAIL │ 0.00 │ TestWhatever/foo/baz/inner-baz │ command-line-arguments │
10-
╰────────┴─────────┴────────────────────────────────┴────────────────────────╯
111
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
122
┃ FAIL package: command-line-arguments ┃
133
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

0 commit comments

Comments
 (0)