diff options
author | James Fargher <jfargher@gitlab.com> | 2021-11-18 05:36:54 +0300 |
---|---|---|
committer | James Fargher <jfargher@gitlab.com> | 2021-11-18 05:36:54 +0300 |
commit | e378bdd7f2a2be0883a5f4ac95c2108da7f84350 (patch) | |
tree | 43ff889ac82d955ab082d621b0fd79865f55711b | |
parent | d69b465fdff3c04f8e3f395aed34aaa59f23fe76 (diff) |
Fix FindAllTags test with hardcoded timezone
Git is actually creating the commit with the local timezone at the date
given. This is +0000 in CI but when run locally it will be whatever the
local timezone is.
-rw-r--r-- | internal/gitaly/service/ref/find_all_tags_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/gitaly/service/ref/find_all_tags_test.go b/internal/gitaly/service/ref/find_all_tags_test.go index 4e8e8539b..904b086e7 100644 --- a/internal/gitaly/service/ref/find_all_tags_test.go +++ b/internal/gitaly/service/ref/find_all_tags_test.go @@ -285,6 +285,7 @@ func TestFindAllTags_duplicateAnnotatedTags(t *testing.T) { commitID := gittest.WriteCommit(t, cfg, repoPath, gittest.WithParents()) date := time.Unix(12345, 0) + dateOffset := date.Format("-0700") tagID, err := repo.WriteTag(ctx, commitID, "commit", []byte("annotated"), []byte("message"), gittest.TestUser, date) @@ -334,7 +335,7 @@ func TestFindAllTags_duplicateAnnotatedTags(t *testing.T) { Name: gittest.TestUser.Name, Email: gittest.TestUser.Email, Date: timestamppb.New(date), - Timezone: []byte("+0000"), + Timezone: []byte(dateOffset), }, TargetCommit: commit, }, @@ -347,7 +348,7 @@ func TestFindAllTags_duplicateAnnotatedTags(t *testing.T) { Name: gittest.TestUser.Name, Email: gittest.TestUser.Email, Date: timestamppb.New(date), - Timezone: []byte("+0000"), + Timezone: []byte(dateOffset), }, TargetCommit: commit, }, |