Skip to content

Commit

Permalink
update (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsimon authored Sep 1, 2022
1 parent 26c928f commit 0c543fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions verifiers/internal/gcb/provenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions verifiers/internal/gcb/provenance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c543fc

Please sign in to comment.