Commit Graph

4 Commits

Author SHA1 Message Date
James Hartig 02e5dc2b45 testutil: If testing.T is nil panic with error (#4725) 2018-10-26 12:13:40 -07:00
Frank Schroeder 111e197462
test: sanitize temp dir names since subtest names have slashes 2017-05-31 00:29:22 +02:00
Frank Schroeder bab25b1c84 test: fix go vet issue 2017-05-12 22:12:47 +02:00
Frank Schroeder eedf0f3ac5 test: add helper for ioutil.TempDir/TempFile
This creates a simplified helper for temporary directories and files.
All path names are prefixed with the name of the current test.
All files and directories are stored either in /tmp/consul-test
or /tmp if the former could not be created.

Using the system temp dir breaks some tests on macOS where the unix
socket path becomes too long.
2017-05-12 22:12:47 +02:00