diff --git a/acceptance/config_test.go b/acceptance/config_test.go index d6713998e..0cf9280c1 100644 --- a/acceptance/config_test.go +++ b/acceptance/config_test.go @@ -31,7 +31,15 @@ type TestConfig struct { // Old is a regexp, New is a replacement expression. Repls []testdiff.Replacement - // List of server stubs to load. + // List of server stubs to load. Example configuration: + // + // [[Server]] + // Pattern = "POST /api/2.1/jobs/create" + // Response.Body = ''' + // { + // "job_id": 1111 + // } + // ''' Server []testserver.Stub } diff --git a/internal/testutil/file.go b/internal/testutil/file.go index 7c0f2d058..476c4123a 100644 --- a/internal/testutil/file.go +++ b/internal/testutil/file.go @@ -62,18 +62,6 @@ func StatFile(t TestingT, path string) os.FileInfo { return fi } -func DetectFile(t TestingT, path string) bool { - _, err := os.Stat(path) - if err == nil { - return true - } - if os.IsNotExist(err) { - return false - } - require.NoError(t, err) - return false -} - // AssertFileContents asserts that the file at path has the expected content. func AssertFileContents(t TestingT, path, expected string) bool { actual := ReadFile(t, path)