MCPcopy Create free account
hub / github.com/operator-framework/operator-sdk / Create

Method Create

internal/olm/client/client_test.go:368–386  ·  view source on GitHub ↗
(ctx context.Context, obj client.Object, opts ...client.CreateOption)

Source from the content-addressed store, hash-verified

366 return c.cli.List(ctx, list, opts...)
367}
368func (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
388func (c *errClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error {
389 return c.cli.Delete(ctx, obj, opts...)

Callers 15

ReconcileMethod · 0.45
ReconcileMethod · 0.45
implementingMetricsMethod · 0.45
implementingAlertsMethod · 0.45
implementingRunbooksMethod · 0.45
writeObjectToFileFunction · 0.45
NewChartFunction · 0.45
untarAllFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected