-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Isolate the testing import in test code
testing_mocks_linux.go imports the testing package, and that import leaks into any binary built with securejoin. This causes issues in projects which check for that, such as Kubernetes (see kubernetes/kubernetes#127832 and its tests). This adds a level of indirection for hooks used to force testing behaviour in procfs_linux.go, so that the mocks can be defined only in _test.go files. This ensures that the testing package is only pulled in for tests. Signed-off-by: Stephen Kitt <skitt@redhat.com>
- Loading branch information
Showing
2 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters