During the review of https://github.com/kubernetes/kubernetes/pull/78779 we've known mapfile doesn't work on macOS. So we need to use alternative way instead and this is it.
We can use framework.ExpectError() for checking the expected error happens. However Expect(err).To(HaveOccurred()) can be used instead and that makes the e2e test code unreadable. This adds the check to use framework.ExpectError() for readable code.
This script checks coding style for test code. It is useful to enforce developers to use framework methods for keeping readable test code for example.