(t *testing.T)
| 36 | ) |
| 37 | |
| 38 | func TestOpenNoPaths(t *testing.T) { |
| 39 | ws, cleanup, err := Open() |
| 40 | defer cleanup() |
| 41 | |
| 42 | assert.NoError(t, err, "Expected opening no paths to succeed.") |
| 43 | assert.Equal( |
| 44 | t, |
| 45 | zapcore.AddSync(io.Discard), |
| 46 | ws, |
| 47 | "Expected opening no paths to return a no-op WriteSyncer.", |
| 48 | ) |
| 49 | } |
| 50 | |
| 51 | func TestOpen(t *testing.T) { |
| 52 | tempName := filepath.Join(t.TempDir(), "test.log") |