tenseleyflow/shithub / 8fb75b6

Browse files

Fix failing test fixtures

Authored by espadonne
SHA
8fb75b6d15d64e4402726296eeeb94e9233b54ed
Parents
0129845
Tree
6dd4371

2 changed files

StatusFile+-
M internal/pulls/review/review_test.go 1 1
M internal/search/search_test.go 3 3
internal/pulls/review/review_test.gomodified
@@ -442,7 +442,7 @@ func TestPositionMap_ContentAware(t *testing.T) {
442
 
442
 
443
 	// Sanity counter-test: a comment on an unchanged line should stay
443
 	// Sanity counter-test: a comment on an unchanged line should stay
444
 	// anchored. Open a fresh PR for cleanliness.
444
 	// anchored. Open a fresh PR for cleanliness.
445
-	commitOnBranch(t, f.gitDir, "trunk2", "init", "README.md", "hi\n")
445
+	commitOnBranch(t, f.gitDir, "trunk2", "init", "README2.md", "hi\n")
446
 	commitOnBranch(t, f.gitDir, "feature2", "add", "y.txt", "alpha\nbravo\ncharlie\n")
446
 	commitOnBranch(t, f.gitDir, "feature2", "add", "y.txt", "alpha\nbravo\ncharlie\n")
447
 	pr2 := f.openPR(t, "trunk2", "feature2")
447
 	pr2 := f.openPR(t, "trunk2", "feature2")
448
 	c2, err := review.AddComment(ctx, f.reviewDeps, review.CommentParams{
448
 	c2, err := review.AddComment(ctx, f.reviewDeps, review.CommentParams{
internal/search/search_test.gomodified
@@ -108,7 +108,7 @@ func setup(t *testing.T) fxs {
108
 	pubRepo, err := rq.CreateRepo(ctx, pool, reposdb.CreateRepoParams{
108
 	pubRepo, err := rq.CreateRepo(ctx, pool, reposdb.CreateRepoParams{
109
 		OwnerUserID:   pgtype.Int8{Int64: alice.ID, Valid: true},
109
 		OwnerUserID:   pgtype.Int8{Int64: alice.ID, Valid: true},
110
 		Name:          "publicrepo",
110
 		Name:          "publicrepo",
111
-		Description:   "a public sample",
111
+		Description:   "a public repo sample",
112
 		DefaultBranch: "trunk",
112
 		DefaultBranch: "trunk",
113
 		Visibility:    reposdb.RepoVisibilityPublic,
113
 		Visibility:    reposdb.RepoVisibilityPublic,
114
 	})
114
 	})
@@ -118,7 +118,7 @@ func setup(t *testing.T) fxs {
118
 	prvRepo, err := rq.CreateRepo(ctx, pool, reposdb.CreateRepoParams{
118
 	prvRepo, err := rq.CreateRepo(ctx, pool, reposdb.CreateRepoParams{
119
 		OwnerUserID:   pgtype.Int8{Int64: alice.ID, Valid: true},
119
 		OwnerUserID:   pgtype.Int8{Int64: alice.ID, Valid: true},
120
 		Name:          "privaterepo",
120
 		Name:          "privaterepo",
121
-		Description:   "secrets here",
121
+		Description:   "private repo secrets here",
122
 		DefaultBranch: "trunk",
122
 		DefaultBranch: "trunk",
123
 		Visibility:    reposdb.RepoVisibilityPrivate,
123
 		Visibility:    reposdb.RepoVisibilityPrivate,
124
 	})
124
 	})
@@ -135,7 +135,7 @@ func setup(t *testing.T) fxs {
135
 	idep := issues.Deps{Pool: pool, Logger: slog.New(slog.NewTextHandler(io.Discard, nil))}
135
 	idep := issues.Deps{Pool: pool, Logger: slog.New(slog.NewTextHandler(io.Discard, nil))}
136
 	if _, err := issues.Create(ctx, idep, issues.CreateParams{
136
 	if _, err := issues.Create(ctx, idep, issues.CreateParams{
137
 		RepoID: pubRepo.ID, AuthorUserID: alice.ID,
137
 		RepoID: pubRepo.ID, AuthorUserID: alice.ID,
138
-		Title: "public bug report", Body: "nothing secret",
138
+		Title: "public bug report", Body: "nothing sensitive",
139
 	}); err != nil {
139
 	}); err != nil {
140
 		t.Fatalf("Create issue pub: %v", err)
140
 		t.Fatalf("Create issue pub: %v", err)
141
 	}
141
 	}