Skip to content

Commit 224722f

Browse files
committed
Fix linter errors
Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com> Signed-off-by: Abdulbois <abdulbois123@gmail.com>
1 parent deee3b4 commit 224722f

6 files changed

+14
-14
lines changed

x/pki/handler_add_noc_root_cert_test.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ func TestHandler_AddNocX509RootCert_AddNew(t *testing.T) {
186186
require.Equal(t, 1, len(approvedCertificatesBySubject.SubjectKeyIds))
187187
require.Equal(t, newNocCertificate.SubjectKeyId, approvedCertificatesBySubject.SubjectKeyIds[0])
188188

189-
approvedCertificatesBySubjectKeyId, err := queryAllApprovedCertificatesBySubjectKeyID(setup, newNocCertificate.SubjectKeyId)
189+
approvedCertificatesBySubjectKeyID, err := queryAllApprovedCertificatesBySubjectKeyID(setup, newNocCertificate.SubjectKeyId)
190190
require.NoError(t, err)
191-
require.Equal(t, 1, len(approvedCertificatesBySubjectKeyId))
192-
require.Equal(t, 1, len(approvedCertificatesBySubjectKeyId[0].Certs))
193-
require.Equal(t, &newNocCertificate, approvedCertificatesBySubjectKeyId[0].Certs[0])
191+
require.Equal(t, 1, len(approvedCertificatesBySubjectKeyID))
192+
require.Equal(t, 1, len(approvedCertificatesBySubjectKeyID[0].Certs))
193+
require.Equal(t, &newNocCertificate, approvedCertificatesBySubjectKeyID[0].Certs[0])
194194

195195
// query noc root certificate by VID
196196
nocRootCertificate, err := querySingleNocRootCertificate(setup, testconstants.Vid)
@@ -248,11 +248,11 @@ func TestHandler_AddNocX509RootCert_Renew(t *testing.T) {
248248
require.Equal(t, newNocCertificate.SubjectKeyId, approvedCertificatesBySubject.SubjectKeyIds[0])
249249

250250
// query noc root certificate by SKID
251-
approvedCertificatesBySubjectKeyId, err := queryAllApprovedCertificatesBySubjectKeyID(setup, newNocCertificate.SubjectKeyId)
251+
approvedCertificatesBySubjectKeyID, err := queryAllApprovedCertificatesBySubjectKeyID(setup, newNocCertificate.SubjectKeyId)
252252
require.NoError(t, err)
253-
require.Equal(t, 1, len(approvedCertificatesBySubjectKeyId))
254-
require.Equal(t, 1, len(approvedCertificatesBySubjectKeyId[0].Certs))
255-
require.Equal(t, &newNocCertificate, approvedCertificatesBySubjectKeyId[0].Certs[0])
253+
require.Equal(t, 1, len(approvedCertificatesBySubjectKeyID))
254+
require.Equal(t, 1, len(approvedCertificatesBySubjectKeyID[0].Certs))
255+
require.Equal(t, &newNocCertificate, approvedCertificatesBySubjectKeyID[0].Certs[0])
256256

257257
// query noc root certificate by VID
258258
nocRootCertificates, err := queryNocRootCertificates(setup, testconstants.Vid)

x/pki/keeper/grpc_query_noc_root_certificates_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types"
1616
)
1717

18-
// Prevent strconv unused error
18+
// Prevent strconv unused error.
1919
var _ = strconv.IntSize
2020

2121
func TestNocRootCertificatesQuerySingle(t *testing.T) {

x/pki/keeper/noc_root_certificates.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (k Keeper) RemoveNocRootCertificates(
7070
))
7171
}
7272

73-
// GetAllNocRootCertificates returns all nocRootCertificates
73+
// GetAllNocRootCertificates returns all nocRootCertificates.
7474
func (k Keeper) GetAllNocRootCertificates(ctx sdk.Context) (list []types.NocRootCertificates) {
7575
store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocRootCertificatesKeyPrefix))
7676
iterator := sdk.KVStorePrefixIterator(store, []byte{})

x/pki/keeper/noc_root_certificates_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types"
1313
)
1414

15-
// Prevent strconv unused error
15+
// Prevent strconv unused error.
1616
var _ = strconv.IntSize
1717

1818
func createNNocRootCertificates(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.NocRootCertificates {

x/pki/module_simulation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const (
7070
defaultWeightMsgAssignVid int = 100
7171

7272
opWeightMsgAddNocX509RootCert = "op_weight_msg_create_chain"
73-
// TODO: Determine the simulation weight value
73+
// TODO: Determine the simulation weight value.
7474
defaultWeightMsgAddNocX509RootCert int = 100
7575

7676
opWeightMsgRemoveX509Cert = "op_weight_msg_create_chain"

x/pki/types/key_noc_root_certificates.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import "encoding/binary"
55
var _ binary.ByteOrder
66

77
const (
8-
// NocRootCertificatesKeyPrefix is the prefix to retrieve all NocRootCertificates
8+
// NocRootCertificatesKeyPrefix is the prefix to retrieve all NocRootCertificates.
99
NocRootCertificatesKeyPrefix = "NocRootCertificates/value/"
1010
)
1111

12-
// NocRootCertificatesKey returns the store key to retrieve a NocRootCertificates from the index fields
12+
// NocRootCertificatesKey returns the store key to retrieve a NocRootCertificates from the index fields.
1313
func NocRootCertificatesKey(
1414
vid int32,
1515
) []byte {

0 commit comments

Comments
 (0)