mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
refactor(test): add lint rule for messages starting with the component (#2045)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com> Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
@@ -168,7 +168,7 @@ func (imgTrustStore *ImageTrustStore) VerifySignature(
|
||||
}
|
||||
|
||||
if manifestDigest.String() == "" {
|
||||
return "", time.Time{}, false, zerr.ErrBadManifestDigest
|
||||
return "", time.Time{}, false, zerr.ErrBadSignatureManifestDigest
|
||||
}
|
||||
|
||||
switch signatureType {
|
||||
@@ -264,7 +264,7 @@ func (validityT *validityTask) DoWork(ctx context.Context) error {
|
||||
if len(sigs[zcommon.CosignSignature]) != 0 || len(sigs[zcommon.NotationSignature]) != 0 {
|
||||
err := validityT.metaDB.UpdateSignaturesValidity(ctx, validityT.repo.Name, godigest.Digest(signedManifest))
|
||||
if err != nil {
|
||||
validityT.log.Info().Msg("error while verifying signatures")
|
||||
validityT.log.Info().Msg("failed to verify signatures")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ func TestVerifySignatures(t *testing.T) {
|
||||
imgTrustStore := &imagetrust.ImageTrustStore{}
|
||||
_, _, _, err := imgTrustStore.VerifySignature("", []byte(""), "", "", image.AsImageMeta(), "repo")
|
||||
So(err, ShouldNotBeNil)
|
||||
So(err, ShouldEqual, zerr.ErrBadManifestDigest)
|
||||
So(err, ShouldEqual, zerr.ErrBadSignatureManifestDigest)
|
||||
})
|
||||
|
||||
Convey("wrong signature type", t, func() {
|
||||
|
||||
Reference in New Issue
Block a user