Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/service/commit/find_commit_test.go')
-rw-r--r--internal/service/commit/find_commit_test.go112
1 files changed, 64 insertions, 48 deletions
diff --git a/internal/service/commit/find_commit_test.go b/internal/service/commit/find_commit_test.go
index 08cc730c8..dcfa5d019 100644
--- a/internal/service/commit/find_commit_test.go
+++ b/internal/service/commit/find_commit_test.go
@@ -57,14 +57,16 @@ func TestSuccessfulFindCommitRequest(t *testing.T) {
Subject: []byte("adds bar folder and branch-test text file to check Repository merged_to_root_ref method"),
Body: []byte("adds bar folder and branch-test text file to check Repository merged_to_root_ref method\n"),
Author: &gitalypb.CommitAuthor{
- Name: []byte("tiagonbotelho"),
- Email: []byte("tiagonbotelho@hotmail.com"),
- Date: &timestamp.Timestamp{Seconds: 1474470806},
+ Name: []byte("tiagonbotelho"),
+ Email: []byte("tiagonbotelho@hotmail.com"),
+ Date: &timestamp.Timestamp{Seconds: 1474470806},
+ Timezone: []byte("+0100"),
},
Committer: &gitalypb.CommitAuthor{
- Name: []byte("tiagonbotelho"),
- Email: []byte("tiagonbotelho@hotmail.com"),
- Date: &timestamp.Timestamp{Seconds: 1474470806},
+ Name: []byte("tiagonbotelho"),
+ Email: []byte("tiagonbotelho@hotmail.com"),
+ Date: &timestamp.Timestamp{Seconds: 1474470806},
+ Timezone: []byte("+0100"),
},
ParentIds: []string{"1b12f15a11fc6e62177bef08f47bc7b5ce50b141"},
BodySize: 88,
@@ -78,14 +80,16 @@ func TestSuccessfulFindCommitRequest(t *testing.T) {
Subject: []byte("More submodules"),
Body: []byte("More submodules\n\nSigned-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>\n"),
Author: &gitalypb.CommitAuthor{
- Name: []byte("Dmitriy Zaporozhets"),
- Email: []byte("dmitriy.zaporozhets@gmail.com"),
- Date: &timestamp.Timestamp{Seconds: 1393491261},
+ Name: []byte("Dmitriy Zaporozhets"),
+ Email: []byte("dmitriy.zaporozhets@gmail.com"),
+ Date: &timestamp.Timestamp{Seconds: 1393491261},
+ Timezone: []byte("+0200"),
},
Committer: &gitalypb.CommitAuthor{
- Name: []byte("Dmitriy Zaporozhets"),
- Email: []byte("dmitriy.zaporozhets@gmail.com"),
- Date: &timestamp.Timestamp{Seconds: 1393491261},
+ Name: []byte("Dmitriy Zaporozhets"),
+ Email: []byte("dmitriy.zaporozhets@gmail.com"),
+ Date: &timestamp.Timestamp{Seconds: 1393491261},
+ Timezone: []byte("+0200"),
},
ParentIds: []string{"d14d6c0abdd253381df51a723d58691b2ee1ab08"},
BodySize: 84,
@@ -99,14 +103,16 @@ func TestSuccessfulFindCommitRequest(t *testing.T) {
Subject: []byte("Merge branch 'branch-merged' into 'master'"),
Body: []byte("Merge branch 'branch-merged' into 'master'\r\n\r\nadds bar folder and branch-test text file to check Repository merged_to_root_ref method\r\n\r\n\r\n\r\nSee merge request !12"),
Author: &gitalypb.CommitAuthor{
- Name: []byte("Job van der Voort"),
- Email: []byte("job@gitlab.com"),
- Date: &timestamp.Timestamp{Seconds: 1474987066},
+ Name: []byte("Job van der Voort"),
+ Email: []byte("job@gitlab.com"),
+ Date: &timestamp.Timestamp{Seconds: 1474987066},
+ Timezone: []byte("+0000"),
},
Committer: &gitalypb.CommitAuthor{
- Name: []byte("Job van der Voort"),
- Email: []byte("job@gitlab.com"),
- Date: &timestamp.Timestamp{Seconds: 1474987066},
+ Name: []byte("Job van der Voort"),
+ Email: []byte("job@gitlab.com"),
+ Date: &timestamp.Timestamp{Seconds: 1474987066},
+ Timezone: []byte("+0000"),
},
ParentIds: []string{
"1b12f15a11fc6e62177bef08f47bc7b5ce50b141",
@@ -123,14 +129,16 @@ func TestSuccessfulFindCommitRequest(t *testing.T) {
Subject: []byte("Initial commit"),
Body: []byte("Initial commit\n"),
Author: &gitalypb.CommitAuthor{
- Name: []byte("Dmitriy Zaporozhets"),
- Email: []byte("dmitriy.zaporozhets@gmail.com"),
- Date: &timestamp.Timestamp{Seconds: 1393488198},
+ Name: []byte("Dmitriy Zaporozhets"),
+ Email: []byte("dmitriy.zaporozhets@gmail.com"),
+ Date: &timestamp.Timestamp{Seconds: 1393488198},
+ Timezone: []byte("-0800"),
},
Committer: &gitalypb.CommitAuthor{
- Name: []byte("Dmitriy Zaporozhets"),
- Email: []byte("dmitriy.zaporozhets@gmail.com"),
- Date: &timestamp.Timestamp{Seconds: 1393488198},
+ Name: []byte("Dmitriy Zaporozhets"),
+ Email: []byte("dmitriy.zaporozhets@gmail.com"),
+ Date: &timestamp.Timestamp{Seconds: 1393488198},
+ Timezone: []byte("-0800"),
},
ParentIds: nil,
BodySize: 15,
@@ -144,14 +152,16 @@ func TestSuccessfulFindCommitRequest(t *testing.T) {
Subject: windows1251Message[:len(windows1251Message)-1],
Body: windows1251Message,
Author: &gitalypb.CommitAuthor{
- Name: []byte("Jacob Vosmaer"),
- Email: []byte("jacob@gitlab.com"),
- Date: &timestamp.Timestamp{Seconds: 1512132977},
+ Name: []byte("Jacob Vosmaer"),
+ Email: []byte("jacob@gitlab.com"),
+ Date: &timestamp.Timestamp{Seconds: 1512132977},
+ Timezone: []byte("+0100"),
},
Committer: &gitalypb.CommitAuthor{
- Name: []byte("Jacob Vosmaer"),
- Email: []byte("jacob@gitlab.com"),
- Date: &timestamp.Timestamp{Seconds: 1512132977},
+ Name: []byte("Jacob Vosmaer"),
+ Email: []byte("jacob@gitlab.com"),
+ Date: &timestamp.Timestamp{Seconds: 1512132977},
+ Timezone: []byte("+0100"),
},
ParentIds: []string{"e63f41fe459e62e1228fcef60d7189127aeba95a"},
BodySize: 49,
@@ -165,14 +175,16 @@ func TestSuccessfulFindCommitRequest(t *testing.T) {
Subject: []byte("Hello\xf0world"),
Body: []byte("Hello\xf0world\n"),
Author: &gitalypb.CommitAuthor{
- Name: []byte("Jacob Vosmaer"),
- Email: []byte("jacob@gitlab.com"),
- Date: &timestamp.Timestamp{Seconds: 1517328273},
+ Name: []byte("Jacob Vosmaer"),
+ Email: []byte("jacob@gitlab.com"),
+ Date: &timestamp.Timestamp{Seconds: 1517328273},
+ Timezone: []byte("+0100"),
},
Committer: &gitalypb.CommitAuthor{
- Name: []byte("Jacob Vosmaer"),
- Email: []byte("jacob@gitlab.com"),
- Date: &timestamp.Timestamp{Seconds: 1517328273},
+ Name: []byte("Jacob Vosmaer"),
+ Email: []byte("jacob@gitlab.com"),
+ Date: &timestamp.Timestamp{Seconds: 1517328273},
+ Timezone: []byte("+0100"),
},
ParentIds: []string{"60ecb67744cb56576c30214ff52294f8ce2def98"},
BodySize: 12,
@@ -185,14 +197,16 @@ func TestSuccessfulFindCommitRequest(t *testing.T) {
Id: bigCommitID,
Subject: []byte("An empty commit with REALLY BIG message"),
Author: &gitalypb.CommitAuthor{
- Name: []byte("Scrooge McDuck"),
- Email: []byte("scrooge@mcduck.com"),
- Date: &timestamp.Timestamp{Seconds: bigCommit.Author.Date.Seconds},
+ Name: []byte("Scrooge McDuck"),
+ Email: []byte("scrooge@mcduck.com"),
+ Date: &timestamp.Timestamp{Seconds: bigCommit.Author.Date.Seconds},
+ Timezone: []byte("+0100"),
},
Committer: &gitalypb.CommitAuthor{
- Name: []byte("Scrooge McDuck"),
- Email: []byte("scrooge@mcduck.com"),
- Date: &timestamp.Timestamp{Seconds: bigCommit.Committer.Date.Seconds},
+ Name: []byte("Scrooge McDuck"),
+ Email: []byte("scrooge@mcduck.com"),
+ Date: &timestamp.Timestamp{Seconds: bigCommit.Committer.Date.Seconds},
+ Timezone: []byte("+0100"),
},
ParentIds: []string{"60ecb67744cb56576c30214ff52294f8ce2def98"},
Body: []byte(bigMessage[:helper.MaxCommitOrTagMessageSize]),
@@ -207,14 +221,16 @@ func TestSuccessfulFindCommitRequest(t *testing.T) {
Subject: []byte("Add file larger than 1 mb"),
Body: []byte("Add file larger than 1 mb\n\nIn order to test Max File Size push rule we need a file larger than 1 MB\n"),
Author: &gitalypb.CommitAuthor{
- Name: []byte("Ruben Davila"),
- Email: []byte("rdavila84@gmail.com"),
- Date: &timestamp.Timestamp{Seconds: 1523247267},
+ Name: []byte("Ruben Davila"),
+ Email: []byte("rdavila84@gmail.com"),
+ Date: &timestamp.Timestamp{Seconds: 1523247267},
+ Timezone: []byte("-0500"),
},
Committer: &gitalypb.CommitAuthor{
- Name: []byte("Jacob Vosmaer"),
- Email: []byte("jacob@gitlab.com"),
- Date: &timestamp.Timestamp{Seconds: 1527855450},
+ Name: []byte("Jacob Vosmaer"),
+ Email: []byte("jacob@gitlab.com"),
+ Date: &timestamp.Timestamp{Seconds: 1527855450},
+ Timezone: []byte("+0200"),
},
ParentIds: []string{"60ecb67744cb56576c30214ff52294f8ce2def98"},
BodySize: 100,