Skip to content

Commit 61b7c73

Browse files
authored
Merge pull request #4696 from kersten/fix/machinery-scaffold-test
🌱 (chore): fix improper usage of errors.As in scaffold tests
2 parents b3cf898 + 9765ec6 commit 61b7c73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/machinery/scaffold_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ var _ = Describe("Scaffold", func() {
171171
func(errType interface{}, files ...Builder) {
172172
err := s.Execute(files...)
173173
Expect(err).To(HaveOccurred())
174-
Expect(errors.As(err, errType)).To(BeTrue())
174+
Expect(errors.As(err, &errType)).To(BeTrue())
175175
},
176176
Entry("should fail if unable to validate a file builder",
177177
&ValidateError{},
@@ -413,7 +413,7 @@ func init() {
413413

414414
err := s.Execute(files...)
415415
Expect(err).To(HaveOccurred())
416-
Expect(errors.As(err, errType)).To(BeTrue())
416+
Expect(errors.As(err, &errType)).To(BeTrue())
417417
},
418418
Entry("should fail if inserting into a model that fails when a file exists and it does exist",
419419
&FileAlreadyExistsError{},

0 commit comments

Comments
 (0)