(t *testing.T)
| 141 | var _ runtime.Object = &unexpectedError{} |
| 142 | |
| 143 | func TestNewRetryWatcher(t *testing.T) { |
| 144 | tt := []struct { |
| 145 | name string |
| 146 | initialRV string |
| 147 | err error |
| 148 | }{ |
| 149 | { |
| 150 | name: "empty RV should fail", |
| 151 | initialRV: "", |
| 152 | err: errors.New("initial RV \"\" is not supported due to issues with underlying WATCH"), |
| 153 | }, |
| 154 | { |
| 155 | name: "RV \"0\" should fail", |
| 156 | initialRV: "0", |
| 157 | err: errors.New("initial RV \"0\" is not supported due to issues with underlying WATCH"), |
| 158 | }, |
| 159 | } |
| 160 | for _, tc := range tt { |
| 161 | t.Run(tc.name, func(t *testing.T) { |
| 162 | _, err := NewRetryWatcher(tc.initialRV, nil) |
| 163 | if !reflect.DeepEqual(err, tc.err) { |
| 164 | t.Errorf("Expected error: %v, got: %v", tc.err, err) |
| 165 | } |
| 166 | }) |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | func TestRetryWatcher(t *testing.T) { |
| 171 | tt := []struct { |
nothing calls this directly
no test coverage detected