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:
authorPavlo Strokov <pstrokov@gitlab.com>2021-07-28 11:58:28 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2021-07-29 10:57:07 +0300
commit794589bb744ba44059b801dc37630997719cbaed (patch)
tree952539cf44de1b22ee66fd242c102289b4dc527a /internal/gitaly/service/operations/submodules_test.go
parent9bfaa0060f63c35115ada469bc833a199ac3dd67 (diff)
lint: Fix deprecated import github.com/golang/protobuf/ptypes
The dependency github.com/golang/protobuf is deprecated and should be replaced with google.golang.org/protobuf. This change replaces usage of the ptypes package. The replacement packages has a different structure and it requires code changes to be done to migrate. The exclusion rules removed from the golanci-lint tool configuration file to prevent future use of the deprecated package.
Diffstat (limited to 'internal/gitaly/service/operations/submodules_test.go')
-rw-r--r--internal/gitaly/service/operations/submodules_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/gitaly/service/operations/submodules_test.go b/internal/gitaly/service/operations/submodules_test.go
index f19dfc70a..0b9d743fa 100644
--- a/internal/gitaly/service/operations/submodules_test.go
+++ b/internal/gitaly/service/operations/submodules_test.go
@@ -5,7 +5,6 @@ import (
"fmt"
"testing"
- "github.com/golang/protobuf/ptypes/timestamp"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/v14/internal/git"
"gitlab.com/gitlab-org/gitaly/v14/internal/git/gittest"
@@ -14,6 +13,7 @@ import (
"gitlab.com/gitlab-org/gitaly/v14/internal/testhelper"
"gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb"
"google.golang.org/grpc/codes"
+ "google.golang.org/protobuf/types/known/timestamppb"
)
func TestSuccessfulUserUpdateSubmoduleRequest(t *testing.T) {
@@ -114,7 +114,7 @@ func TestUserUpdateSubmoduleStableID(t *testing.T) {
CommitSha: "41fa1bc9e0f0630ced6a8a211d60c2af425ecc2d",
Branch: []byte("master"),
CommitMessage: []byte("Update Submodule message"),
- Timestamp: &timestamp.Timestamp{Seconds: 12345},
+ Timestamp: &timestamppb.Timestamp{Seconds: 12345},
})
require.NoError(t, err)
require.Empty(t, response.GetCommitError())
@@ -134,13 +134,13 @@ func TestUserUpdateSubmoduleStableID(t *testing.T) {
Author: &gitalypb.CommitAuthor{
Name: gittest.TestUser.Name,
Email: gittest.TestUser.Email,
- Date: &timestamp.Timestamp{Seconds: 12345},
+ Date: &timestamppb.Timestamp{Seconds: 12345},
Timezone: []byte(gittest.TimezoneOffset),
},
Committer: &gitalypb.CommitAuthor{
Name: gittest.TestUser.Name,
Email: gittest.TestUser.Email,
- Date: &timestamp.Timestamp{Seconds: 12345},
+ Date: &timestamppb.Timestamp{Seconds: 12345},
Timezone: []byte(gittest.TimezoneOffset),
},
}, commit)