Skip to content

Commit 98e0a04

Browse files
committed
Call commit command to save git notes while testing
1 parent b57c38c commit 98e0a04

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

command/report_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ func TestReportDefaultOptions(t *testing.T) {
2727

2828
repo.Commit(repo.Stage(filepath.Join("event", "event.go"), filepath.Join("event", "event_test.go")))
2929

30+
// save notes to git repository
31+
(CommitCmd{Ui: new(cli.MockUi)}).Run([]string{"-yes"})
32+
3033
ui := new(cli.MockUi)
3134
c := ReportCmd{Ui: ui}
3235

@@ -54,6 +57,9 @@ func TestReportSummary(t *testing.T) {
5457

5558
repo.Commit(repo.Stage(filepath.Join("event", "event.go"), filepath.Join("event", "event_test.go")))
5659

60+
// save notes to git repository
61+
(CommitCmd{Ui: new(cli.MockUi)}).Run([]string{"-yes"})
62+
5763
ui := new(cli.MockUi)
5864
c := ReportCmd{Ui: ui}
5965

@@ -81,6 +87,9 @@ func TestReportAll(t *testing.T) {
8187

8288
repo.Commit(repo.Stage(filepath.Join("event", "event.go"), filepath.Join("event", "event_test.go")))
8389

90+
// save notes to git repository
91+
(CommitCmd{Ui: new(cli.MockUi)}).Run([]string{"-yes"})
92+
8493
ui := new(cli.MockUi)
8594
c := ReportCmd{Ui: ui}
8695

@@ -108,6 +117,9 @@ func TestReportTimelineHours(t *testing.T) {
108117

109118
repo.Commit(repo.Stage(filepath.Join("event", "event.go"), filepath.Join("event", "event_test.go")))
110119

120+
// save notes to git repository
121+
(CommitCmd{Ui: new(cli.MockUi)}).Run([]string{"-yes"})
122+
111123
ui := new(cli.MockUi)
112124
c := ReportCmd{Ui: ui}
113125

@@ -135,6 +147,9 @@ func TestReportTimelineCommits(t *testing.T) {
135147

136148
repo.Commit(repo.Stage(filepath.Join("event", "event.go"), filepath.Join("event", "event_test.go")))
137149

150+
// save notes to git repository
151+
(CommitCmd{Ui: new(cli.MockUi)}).Run([]string{"-yes"})
152+
138153
ui := new(cli.MockUi)
139154
c := ReportCmd{Ui: ui}
140155

@@ -162,6 +177,9 @@ func TestReportFiles(t *testing.T) {
162177

163178
repo.Commit(repo.Stage(filepath.Join("event", "event.go"), filepath.Join("event", "event_test.go")))
164179

180+
// save notes to git repository
181+
(CommitCmd{Ui: new(cli.MockUi)}).Run([]string{"-yes"})
182+
165183
ui := new(cli.MockUi)
166184
c := ReportCmd{Ui: ui}
167185

0 commit comments

Comments
 (0)