This commit is contained in:
laurentsimon
2022-09-01 01:00:56 +00:00
committed by GitHub
parent 26c928f5b7
commit 0c543fcce0
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -175,8 +175,8 @@ func (self *Provenance) VerifyTextProvenance() error {
}
// Note: DeepEqual() has problem with time comparisons: https://github.com/onsi/gomega/issues/264
// but this should not affect us since both times are supposed to have the the same string and
// they are both taken from a strng representation.
// but this should not affect us since both times are supposed to have the same string and
// they are both taken from a string representation.
// We do not use cmp.Equal() because it *can* panic and is intended for unit tests only.
if !reflect.DeepEqual(unverifiedTextIntotoStatement, *self.verifiedIntotoStatement) {
return fmt.Errorf("%w: diff '%s'", serrors.ErrorMismatchIntoto,
+2 -2
View File
@@ -521,8 +521,8 @@ func Test_VerifyTextProvenance(t *testing.T) {
}
if err = json.Unmarshal(patch, &prov.verifiedProvenance.Build.UnverifiedTextIntotoStatement); err != nil {
// If we updated a characters that make a non-string fiel invalid, like Time, unmarshalin will fail,
// and we ignore the error.
// If we updated a character that makes a non-string field invalid, like Time, unmarshaling will fail,
// so we ignore the error.
i += 1
patch = []byte(strings.Clone(string(cpy)))
continue