(key string, value string)
| 246 | } |
| 247 | |
| 248 | func (idx *failingIndex) Set(key string, value string) error { |
| 249 | idx.setCount++ |
| 250 | if idx.setCount == 1 { // fail the first time |
| 251 | return errDummy |
| 252 | } |
| 253 | return idx.KeyValue.Set(key, value) |
| 254 | } |
| 255 | |
| 256 | func TestReadHeader(t *testing.T) { |
| 257 | tests := []struct { |