Skip to content

Commit 90a2d4c

Browse files
committed
Renamed comment tag in tests.
1 parent 80e8deb commit 90a2d4c

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

database/comment_test.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func initMocks(t *testing.T) (*gomock.Controller, *mocks.MockSchemeCommenter, co
1919
func TestMakeCommentsWithTableName(t *testing.T) {
2020
type Ballot struct {
2121
//nolint
22-
tableName struct{} `pg:"ballots" pg-comment:"Ballot table"`
22+
tableName struct{} `pg:"ballots" comment:"Ballot table"`
2323
Ballot string `json:"ballot"`
2424
}
2525

@@ -76,7 +76,7 @@ func TestMakeCommentsFieldWithPgComment(t *testing.T) {
7676
type Ballot struct {
7777
//nolint
7878
tableName struct{} `pg:"ballots"`
79-
Ballot string `json:"ballot" pg-comment:"This is field comment"`
79+
Ballot string `json:"ballot" comment:"This is field comment"`
8080
}
8181

8282
mockCtrl, mockSC, ctx := initMocks(t)
@@ -101,22 +101,22 @@ func TestMakeCommentsFieldWithPgComment(t *testing.T) {
101101
func TestMakeCommentsWithTableNameAndFieldsWithPgComment(t *testing.T) {
102102
type Ballot struct {
103103
//nolint
104-
tableName struct{} `pg:"ballots" pg-comment:"Ballot table"`
105-
CreatedAt int64 `json:"-" pg-comment:"This is field comment"`
106-
UpdatedAt int64 `json:"-" pg-comment:"This is field comment"`
107-
Network string `json:"network" pg:",pk" pg-comment:"This is field comment"`
108-
Hash string `json:"hash" pg:",pk" pg-comment:"This is field comment"`
109-
Branch string `json:"branch" pg-comment:"This is field comment"`
110-
Status string `json:"status" pg-comment:"This is field comment"`
111-
Kind string `json:"kind" pg-comment:"This is field comment"`
112-
Signature string `json:"signature" pg-comment:"This is field comment"`
113-
Protocol string `json:"protocol" pg-comment:"This is field comment"`
114-
Level uint64 `json:"level" pg-comment:"This is field comment"`
115-
Errors interface{} `json:"errors,omitempty" pg:"type:jsonb" pg-comment:"This is field comment"`
116-
ExpirationLevel *uint64 `json:"expiration_level" pg-comment:"This is field comment"`
117-
Raw interface{} `json:"raw,omitempty" pg:"type:jsonb" pg-comment:"This is field comment"`
118-
Ballot string `json:"ballot" pg-comment:"This is field comment"`
119-
Period int64 `json:"period" pg-comment:"This is field comment"`
104+
tableName struct{} `pg:"ballots" comment:"Ballot table"`
105+
CreatedAt int64 `json:"-" comment:"This is field comment"`
106+
UpdatedAt int64 `json:"-" comment:"This is field comment"`
107+
Network string `json:"network" pg:",pk" comment:"This is field comment"`
108+
Hash string `json:"hash" pg:",pk" comment:"This is field comment"`
109+
Branch string `json:"branch" comment:"This is field comment"`
110+
Status string `json:"status" comment:"This is field comment"`
111+
Kind string `json:"kind" comment:"This is field comment"`
112+
Signature string `json:"signature" comment:"This is field comment"`
113+
Protocol string `json:"protocol" comment:"This is field comment"`
114+
Level uint64 `json:"level" comment:"This is field comment"`
115+
Errors interface{} `json:"errors,omitempty" pg:"type:jsonb" comment:"This is field comment"`
116+
ExpirationLevel *uint64 `json:"expiration_level" comment:"This is field comment"`
117+
Raw interface{} `json:"raw,omitempty" pg:"type:jsonb" comment:"This is field comment"`
118+
Ballot string `json:"ballot" comment:"This is field comment"`
119+
Period int64 `json:"period" comment:"This is field comment"`
120120
}
121121

122122
mockCtrl, mockSC, ctx := initMocks(t)
@@ -148,8 +148,8 @@ func TestMakeCommentsWithTableNameAndFieldsWithPgComment(t *testing.T) {
148148
func TestMakeCommentsWithMultipleModels(t *testing.T) {
149149
type Ballot struct {
150150
//nolint
151-
tableName struct{} `pg:"ballots" pg-comment:"This multiple table name comment"`
152-
Ballot string `json:"ballot" pg-comment:"This is multiple field comment"`
151+
tableName struct{} `pg:"ballots" comment:"This multiple table name comment"`
152+
Ballot string `json:"ballot" comment:"This is multiple field comment"`
153153
}
154154

155155
mockCtrl, mockSC, ctx := initMocks(t)
@@ -182,8 +182,8 @@ func TestMakeCommentsWithMultipleModels(t *testing.T) {
182182
func TestMakeCommentsWithMultipleModelsByPointers(t *testing.T) {
183183
type Ballot struct {
184184
//nolint
185-
tableName struct{} `pg:"ballots" pg-comment:"This multiple table name comment"`
186-
Ballot string `json:"ballot" pg-comment:"This is multiple field comment"`
185+
tableName struct{} `pg:"ballots" comment:"This multiple table name comment"`
186+
Ballot string `json:"ballot" comment:"This is multiple field comment"`
187187
}
188188

189189
mockCtrl, mockSC, ctx := initMocks(t)

0 commit comments

Comments
 (0)