(ctx context.Context, obj client.Object, opts ...client.CreateOption)
| 366 | return c.cli.List(ctx, list, opts...) |
| 367 | } |
| 368 | func (c *errClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error { |
| 369 | switch obj.GetName() { |
| 370 | case "no-match": |
| 371 | return &meta.NoResourceMatchError{} |
| 372 | |
| 373 | case "eventually-match": |
| 374 | if c.noMatchCounter >= 4 { |
| 375 | return c.cli.Create(ctx, obj, opts...) |
| 376 | } |
| 377 | c.noMatchCounter++ |
| 378 | return &meta.NoResourceMatchError{} |
| 379 | |
| 380 | case "unknown-error": |
| 381 | return errors.New("fake error") |
| 382 | |
| 383 | default: |
| 384 | return c.cli.Create(ctx, obj, opts...) |
| 385 | } |
| 386 | } |
| 387 | |
| 388 | func (c *errClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error { |
| 389 | return c.cli.Delete(ctx, obj, opts...) |
no outgoing calls
no test coverage detected