cleanup: use errors.As() in e2e/utils

See-also: https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-06-25 10:35:19 +02:00 committed by mergify[bot]
parent a47cfbc6c8
commit c9d5bc8a08

View File

@ -375,7 +375,8 @@ func getSecret(path string) v1.Secret {
err := unmarshal(path, &sc) err := unmarshal(path, &sc)
// discard corruptInputError // discard corruptInputError
if err != nil { if err != nil {
if _, ok := err.(base64.CorruptInputError); !ok { var b64cie base64.CorruptInputError
if !errors.As(err, &b64cie) {
Expect(err).Should(BeNil()) Expect(err).Should(BeNil())
} }
} }