Skip to content

Commit b60ed6c

Browse files
committed
[content-service] Fix outdated test expectations
1 parent df23a62 commit b60ed6c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

components/content-service/pkg/git/git_test.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestGitStatus(t *testing.T) {
3838
&Status{
3939
porcelainStatus: porcelainStatus{
4040
BranchOID: "(initial)",
41-
BranchHead: "master",
41+
BranchHead: "main",
4242
},
4343
},
4444
nil,
@@ -53,7 +53,7 @@ func TestGitStatus(t *testing.T) {
5353
},
5454
&Status{
5555
porcelainStatus: porcelainStatus{
56-
BranchHead: "master",
56+
BranchHead: "main",
5757
BranchOID: notEmpty,
5858
},
5959
LatestCommit: notEmpty,
@@ -73,7 +73,7 @@ func TestGitStatus(t *testing.T) {
7373
},
7474
&Status{
7575
porcelainStatus: porcelainStatus{
76-
BranchHead: "master",
76+
BranchHead: "main",
7777
BranchOID: notEmpty,
7878
UntrackedFiles: []string{"another-file"},
7979
},
@@ -94,7 +94,7 @@ func TestGitStatus(t *testing.T) {
9494
},
9595
&Status{
9696
porcelainStatus: porcelainStatus{
97-
BranchHead: "master",
97+
BranchHead: "main",
9898
BranchOID: notEmpty,
9999
UncommitedFiles: []string{"first-file"},
100100
},
@@ -118,7 +118,7 @@ func TestGitStatus(t *testing.T) {
118118
},
119119
&Status{
120120
porcelainStatus: porcelainStatus{
121-
BranchHead: "master",
121+
BranchHead: "main",
122122
BranchOID: notEmpty,
123123
},
124124
UnpushedCommits: []string{notEmpty},
@@ -170,7 +170,7 @@ func TestGitStatus(t *testing.T) {
170170
},
171171
&Status{
172172
porcelainStatus: porcelainStatus{
173-
BranchHead: "master",
173+
BranchHead: "main",
174174
BranchOID: notEmpty,
175175
UntrackedFiles: []string{"this/is/a/nested/test/first-file"},
176176
},
@@ -247,7 +247,7 @@ func TestGitStatusFromFiles(t *testing.T) {
247247
&Status{
248248
porcelainStatus: porcelainStatus{
249249
BranchOID: "(initial)",
250-
BranchHead: "master",
250+
BranchHead: "main",
251251
},
252252
},
253253
nil,
@@ -262,7 +262,7 @@ func TestGitStatusFromFiles(t *testing.T) {
262262
},
263263
&Status{
264264
porcelainStatus: porcelainStatus{
265-
BranchHead: "master",
265+
BranchHead: "main",
266266
BranchOID: notEmpty,
267267
},
268268
LatestCommit: notEmpty,
@@ -282,7 +282,7 @@ func TestGitStatusFromFiles(t *testing.T) {
282282
},
283283
&Status{
284284
porcelainStatus: porcelainStatus{
285-
BranchHead: "master",
285+
BranchHead: "main",
286286
BranchOID: notEmpty,
287287
UntrackedFiles: []string{"another-file"},
288288
},
@@ -303,7 +303,7 @@ func TestGitStatusFromFiles(t *testing.T) {
303303
},
304304
&Status{
305305
porcelainStatus: porcelainStatus{
306-
BranchHead: "master",
306+
BranchHead: "main",
307307
BranchOID: notEmpty,
308308
UncommitedFiles: []string{"first-file"},
309309
},
@@ -327,7 +327,7 @@ func TestGitStatusFromFiles(t *testing.T) {
327327
},
328328
&Status{
329329
porcelainStatus: porcelainStatus{
330-
BranchHead: "master",
330+
BranchHead: "main",
331331
BranchOID: notEmpty,
332332
},
333333
UnpushedCommits: []string{notEmpty},
@@ -379,7 +379,7 @@ func TestGitStatusFromFiles(t *testing.T) {
379379
},
380380
&Status{
381381
porcelainStatus: porcelainStatus{
382-
BranchHead: "master",
382+
BranchHead: "main",
383383
BranchOID: notEmpty,
384384
UntrackedFiles: []string{"this/is/a/nested/test/first-file"},
385385
},
@@ -437,7 +437,7 @@ func TestGitStatusFromFiles(t *testing.T) {
437437
}
438438

439439
gitout, err = client.GitWithOutput(ctx, &errNoCommitsYet, "log", "--pretty=%H", "-n", "1")
440-
if err != nil && !strings.Contains(err.Error(), "fatal: your current branch 'master' does not have any commits yet") {
440+
if err != nil && !strings.Contains(err.Error(), "fatal: your current branch 'main' does not have any commits yet") {
441441
t.Errorf("error calling GitWithOutput: %v", err)
442442
return
443443
}

0 commit comments

Comments
 (0)