(t *testing.T)
| 116 | } |
| 117 | |
| 118 | func TestLogFileCreatesTemporaryFile(t *testing.T) { |
| 119 | ctx := context.Background() |
| 120 | |
| 121 | l, _ := LoggerFor(ctx) |
| 122 | defer l.Close() |
| 123 | defer os.Remove(l.LogFile()) |
| 124 | |
| 125 | path := l.LogFile() |
| 126 | assert.True(t, strings.Contains(path, "scenario-")) |
| 127 | assert.True(t, strings.HasSuffix(path, ".log")) |
| 128 | |
| 129 | _, err := os.Stat(path) |
| 130 | assert.NoError(t, err) |
| 131 | } |