Skip to content

Commit

Permalink
update test files
Browse files Browse the repository at this point in the history
  • Loading branch information
camdencheek committed Apr 10, 2024
1 parent 2817965 commit fce7286
Show file tree
Hide file tree
Showing 17 changed files with 265 additions and 5 deletions.
1 change: 1 addition & 0 deletions internal/e2e/e2e_rank_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func assertGolden(t *testing.T, name string, got []byte) {

wantPath := filepath.Join("testdata", name+".txt")
if *update {
fmt.Printf("writing file: %s", wantPath)
if err := os.WriteFile(wantPath, got, 0o600); err != nil {
t.Fatal(err)
}
Expand Down
18 changes: 18 additions & 0 deletions internal/e2e/testdata/Get_databaseuser.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,56 @@ targetRank: 3

github.com/sourcegraph/sourcegraph/internal/database/user_emails.go
161:func (s *userEmailsStore) Get(ctx context.Context, userID int32, email string) (emailCanonicalCase string, verified bool, err error) {

50: Get(ctx context.Context, userID int32, email string) (emailCanonicalCase string, verified bool, err error)

91:func (s *userEmailsStore) GetInitialSiteAdminInfo(ctx context.Context) (email string, tosAccepted bool, err error) {

hidden 14 more line matches

github.com/sourcegraph/sourcegraph/internal/database/user_roles.go
35: GetUserRoleOpts UserRoleOpts

358:func (r *userRoleStore) GetByUserID(ctx context.Context, opts GetUserRoleOpts) ([]*types.UserRole, error) {

365:func (r *userRoleStore) GetByRoleID(ctx context.Context, opts GetUserRoleOpts) ([]*types.UserRole, error) {

hidden 8 more line matches

**github.com/sourcegraph/sourcegraph/internal/database/users.go**
940:func (u *userStore) GetByID(ctx context.Context, id int32) (*types.User, error) {

947:func (u *userStore) GetByVerifiedEmail(ctx context.Context, email string) (*types.User, error) {

951:func (u *userStore) GetByUsername(ctx context.Context, username string) (*types.User, error) {

hidden 17 more line matches

github.com/sourcegraph/sourcegraph/internal/database/user_credentials.go
248:func (s *userCredentialsStore) GetByID(ctx context.Context, id int64) (*UserCredential, error) {

271:func (s *userCredentialsStore) GetByScope(ctx context.Context, scope UserCredentialScope) (*UserCredential, error) {

108: GetByID(ctx context.Context, id int64) (*UserCredential, error)

hidden 8 more line matches

github.com/sourcegraph/sourcegraph/internal/database/user_emails_test.go
56:func TestUserEmails_Get(t *testing.T) {

106:func TestUserEmails_GetPrimary(t *testing.T) {

585:func TestUserEmails_GetLatestVerificationSentEmail(t *testing.T) {

hidden 10 more line matches

github.com/sourcegraph/sourcegraph/internal/database/users_test.go
628:func TestUsers_GetByVerifiedEmail(t *testing.T) {

664:func TestUsers_GetByUsername(t *testing.T) {

711:func TestUsers_GetByUsernames(t *testing.T) {

hidden 32 more line matches

hidden 3 more file matches
11 changes: 11 additions & 0 deletions internal/e2e/testdata/InternalDoer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,36 @@ targetRank: 1

**github.com/sourcegraph/sourcegraph/internal/httpcli/client.go**
217:var InternalDoer, _ = InternalClientFactory.Doer()

215:// InternalDoer is a shared client for internal communication. This is a


github.com/sourcegraph/sourcegraph/internal/api/internalapi/client.go
144: resp, err := httpcli.InternalDoer.Do(req.WithContext(ctx))


github.com/sourcegraph/sourcegraph/enterprise/cmd/embeddings/qa/context_data.tsv
3:In the sourcegraph repository, what does InternalDoer do? internal/httpcli/client.go

4:In my codebase, what does InternalDoer do? internal/httpcli/client.go


github.com/sourcegraph/sourcegraph/cmd/frontend/internal/app/badge.go
23: totalRefs, err := backend.CountGoImporters(r.Context(), httpcli.InternalDoer, routevar.ToRepo(mux.Vars(r)))


github.com/sourcegraph/sourcegraph/internal/batches/webhooks/webhooks.go
67: Enqueue(ctx, logger, db, eventType, marshalBatchChange, id, httpcli.InternalDoer)

74: Enqueue(ctx, logger, db, eventType, marshalChangeset, id, httpcli.InternalDoer)


github.com/sourcegraph/sourcegraph/cmd/frontend/internal/app/resolvers/app.go
53: doer: httpcli.InternalDoer,

354: cli := httpcli.InternalDoer

424: cli := httpcli.InternalDoer


hidden 9 more file matches
15 changes: 15 additions & 0 deletions internal/e2e/testdata/Repository_metadata_Write_rbac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,46 @@ targetRank: -1

github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/repository_metadata.go
54:func (r *schemaResolver) AddRepoMetadata(ctx context.Context, args struct {

95:func (r *schemaResolver) UpdateRepoMetadata(ctx context.Context, args struct {

134:func (r *schemaResolver) DeleteRepoMetadata(ctx context.Context, args struct {

hidden 30 more line matches

github.com/sourcegraph/sourcegraph/client/web/src/repo/tree/TreePageContent.tsx
666:interface RepositoryContributorNodeProps extends QuerySpec {

10:import { RepoMetadata } from '@sourcegraph/branded'

16:import { RepositoryType, SearchPatternType, type TreeFields } from '@sourcegraph/shared/src/graphql-operations'

hidden 46 more line matches

github.com/sourcegraph/sourcegraph/doc/admin/repo/metadata.md
1:# Custom repository metadata

18:## Adding metadata

8:### Repository owners

hidden 14 more line matches

github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/repository_metadata_test.go
26:func TestRepositoryMetadata(t *testing.T) {

17: "github.com/sourcegraph/sourcegraph/internal/rbac"

23: rtypes "github.com/sourcegraph/sourcegraph/internal/rbac/types"

hidden 25 more line matches

github.com/sourcegraph/sourcegraph/client/web/src/repo/repoContainerRoutes.tsx
3:import { canWriteRepoMetadata } from '../util/rbac'

5:import { RepositoryChangelistPage } from './commit/RepositoryCommitPage'

9:const RepositoryCommitPage = lazyComponent(() => import('./commit/RepositoryCommitPage'), 'RepositoryCommitPage')

hidden 19 more line matches

Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,56 @@ targetRank: 1

**github.com/sourcegraph/sourcegraph/ui/assets/assets.go**
30: return nil, errors.New("assets are not configured for this binary, please see ui/assets")

34: panic("assets are not configured for this binary, please see ui/assets")

33:func (p FailingAssetsProvider) Assets() http.FileSystem {

hidden 12 more line matches

github.com/sourcegraph/sourcegraph/schema/schema.go
492:type BrandAssets struct {

1530:type Notice struct {

1538:type Notifications struct {

hidden 668 more line matches

github.com/sourcegraph/sourcegraph/doc/admin/executors/deploy_executors.md
118:## Confirm executors are working

194:### Configuring the auth config for use in executors

216:### Adding certificates to a binary deployment

hidden 47 more line matches

github.com/sourcegraph/sourcegraph/doc/getting-started/github-vs-sourcegraph.md
8:## Which is best for you?

110:### Searching repositories, branches, and forks

18:As your codebase grows in complexity, the value of code search quickly increases. Sourcegraph may be a good fit for your team if:

hidden 66 more line matches

github.com/sourcegraph/sourcegraph/doc/admin/executors/deploy_executors_terraform.md
1:# Deploying Sourcegraph executors using Terraform on AWS or GCP

56:## Terraform Version

415:### **Step 1:** Update the source version of the terraform modules

hidden 68 more line matches

github.com/sourcegraph/sourcegraph/doc/dev/background-information/sg/reference.md
496:### sg lint format

505:### sg lint format

1:<!-- DO NOT EDIT: generated via: go generate ./dev/sg -->

hidden 265 more line matches

hidden 3 more file matches
18 changes: 18 additions & 0 deletions internal/e2e/testdata/bufio_buffer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,56 @@ targetRank: 2

github.com/golang/go/src/bytes/buffer.go
20:type Buffer struct {

60:func (b *Buffer) AvailableBuffer() []byte { return b.buf[len(b.buf):] }

472:func NewBuffer(buf []byte) *Buffer { return &Buffer{buf: buf} }

hidden 108 more line matches

**github.com/golang/go/src/bufio/scan.go**
267:func (s *Scanner) Buffer(buf []byte, max int) {

5:package bufio

25:// large to fit in the buffer. When a scan stops, the reader may have

hidden 21 more line matches

github.com/golang/go/src/bufio/bufio.go
8:package bufio

665:func (b *Writer) AvailableBuffer() []byte {

338:func (b *Reader) Buffered() int { return b.w - b.r }

hidden 89 more line matches

github.com/golang/go/src/cmd/doc/pkg.go
59: bytes.Buffer

56:type pkgBuffer struct {

8: "bufio"

hidden 8 more line matches

github.com/golang/go/src/net/http/h2_bundle.go
3716:type http2pipeBuffer interface {

1086:type http2dataBuffer struct {

3724:func (p *http2pipe) setBuffer(b http2pipeBuffer) {

hidden 116 more line matches

github.com/golang/go/src/image/png/writer.go
36:type EncoderBuffer encoder

24: BufferPool EncoderBufferPool

30:type EncoderBufferPool interface {

hidden 18 more line matches

hidden 113 more file matches
18 changes: 18 additions & 0 deletions internal/e2e/testdata/bufio_flush_writer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,56 @@ targetRank: 25

github.com/golang/go/src/image/gif/writer.go
43:type writer interface {

77:func (b blockWriter) Flush() error {

123:func (e *encoder) flush() {

hidden 28 more line matches

github.com/golang/go/src/image/jpeg/writer.go
211:type writer interface {

231:func (e *encoder) flush() {

212: Flush() error

hidden 11 more line matches

github.com/golang/go/src/compress/lzw/writer.go
15:type writer interface {

36:type Writer struct {

17: Flush() error

hidden 36 more line matches

github.com/golang/go/src/bufio/bufio.go
579:type Writer struct {

635:func (b *Writer) Flush() error {

836: *Writer

hidden 72 more line matches

github.com/golang/go/src/archive/zip/writer.go
24:type Writer struct {

61:func (w *Writer) Flush() error {

607: io.Writer

hidden 55 more line matches

github.com/golang/go/src/encoding/csv/writer.go
30:type Writer struct {

123:func (w *Writer) Flush() {

37:func NewWriter(w io.Writer) *Writer {

hidden 25 more line matches

hidden 78 more file matches
28 changes: 23 additions & 5 deletions internal/e2e/testdata/bytes_buffer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,56 @@ targetRank: 1

**github.com/golang/go/src/bytes/buffer.go**
20:type Buffer struct {

54:func (b *Buffer) Bytes() []byte { return b.buf[b.off:] }

5:package bytes

hidden 126 more line matches

github.com/golang/go/src/cmd/internal/edit/edit.go
14:type Buffer struct {

68:func (b *Buffer) Bytes() []byte {

41:func NewBuffer(data []byte) *Buffer {

hidden 13 more line matches

github.com/golang/go/src/hash/crc32/crc32_ppc64le.s
122: SLD $2,R8 // convert index-> bytes
59: MOVWZ 0(R5),R8 // 0-3 bytes of p ?Endian?
60: MOVWZ 4(R5),R9 // 4-7 bytes of p
hidden 35 more line matches
github.com/golang/go/misc/wasm/wasm_exec.js
497: const bytes = encoder.encode(str + "\0");

48: read(fd, buffer, offset, length, position, callback) { callback(enosys()); },

192: return new Uint8Array(this._inst.exports.mem.buffer, array, len);

hidden 10 more line matches

github.com/golang/go/src/fmt/print.go
101:type buffer []byte

509:func (p *pp) fmtBytes(v []byte, verb rune, typeString string) {

17:// Strings for use with buffer.WriteString.

hidden 28 more line matches

github.com/golang/go/src/bufio/scan.go
106:func (s *Scanner) Bytes() []byte {

267:func (s *Scanner) Buffer(buf []byte, max int) {

289:func ScanBytes(data []byte, atEOF bool) (advance int, token []byte, err error) {

hidden 26 more line matches

github.com/golang/go/src/os/exec/exec.go
1134:func (w *prefixSuffixSaver) Bytes() []byte {

94: "bytes"

396: if i := bytes.Index(stack, []byte("\nos/exec.Command(")); i >= 0 {

hidden 17 more line matches

hidden 494 more file matches
Loading

0 comments on commit fce7286

Please sign in to comment.