Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

osm-controller/test: compare cert for equality instead of its length #1639

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

shashankram
Copy link
Member

The test hardcodes the expected length for a certificate, compare
the certificate content instead. An issue was seen when the Go
version was updated, possibly resulting from a change in a lib
used for generating the certs. This change removes the length
check and directly compares the certificate.

Resolves #1635

Signed-off-by: Shashank Ram shashank08@gmail.com

  • New Functionality [ ]
  • Documentation [ ]
  • Install [ ]
  • Control Plane [ ]
  • CLI Tool [ ]
  • Certificate Management [ ]
  • Networking [ ]
  • Metrics [ ]
  • SMI Policy [ ]
  • Security [ ]
  • Tests / CI System [X]
  • Other [ ]

Please answer the following questions with yes/no.

  • Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?
    No

The test hardcodes the expected length for a certificate, compare
the certificate content instead. An issue was seen when the Go
version was updated, possibly resulting from a change in a lib
used for generating the certs. This change removes the length
check and directly compares the certificate.

Resolves openservicemesh#1635

Signed-off-by: Shashank Ram <shashank08@gmail.com>
@shashankram shashankram marked this pull request as ready for review August 27, 2020 22:36
@shashankram shashankram requested a review from a team as a code owner August 27, 2020 22:36
@shashankram shashankram merged commit 4a35522 into openservicemesh:main Aug 27, 2020
@shashankram shashankram deleted the fix-test branch August 27, 2020 22:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

osm-controller_test.go fails due to hardcoded certificate byte length with Go 1.15
3 participants