(t *testing.T)
| 109 | } |
| 110 | |
| 111 | func TestIOCoreSyncFail(t *testing.T) { |
| 112 | sink := &ztest.Discarder{} |
| 113 | err := errors.New("failed") |
| 114 | sink.SetError(err) |
| 115 | |
| 116 | core := NewCore( |
| 117 | NewJSONEncoder(testEncoderConfig()), |
| 118 | sink, |
| 119 | DebugLevel, |
| 120 | ) |
| 121 | |
| 122 | assert.Equal( |
| 123 | t, |
| 124 | err, |
| 125 | core.Sync(), |
| 126 | "Expected core.Sync to return errors from underlying WriteSyncer.", |
| 127 | ) |
| 128 | } |
| 129 | |
| 130 | func TestIOCoreSyncsOutput(t *testing.T) { |
| 131 | tests := []struct { |
nothing calls this directly
no test coverage detected