-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dario Tranchitella <[email protected]>
- Loading branch information
1 parent
6ea480c
commit 5bf1887
Showing
2 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
//go:build e2e | ||
|
||
// Copyright 2020-2023 Project Capsule Authors. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package e2e | ||
|
||
import ( | ||
"context" | ||
"time" | ||
|
||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
) | ||
|
||
type e2eClient struct { | ||
client.Client | ||
} | ||
|
||
func (e *e2eClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error { | ||
time.Sleep(time.Second) | ||
|
||
return e.Client.Get(ctx, key, obj, opts...) | ||
} | ||
|
||
func (e *e2eClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error { | ||
time.Sleep(time.Second) | ||
|
||
return e.Client.List(ctx, list, opts...) | ||
} | ||
|
||
func (e *e2eClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error { | ||
time.Sleep(time.Second) | ||
|
||
return e.Client.Create(ctx, obj, opts...) | ||
} | ||
|
||
func (e *e2eClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error { | ||
time.Sleep(time.Second) | ||
|
||
return e.Client.Delete(ctx, obj, opts...) | ||
} | ||
|
||
func (e *e2eClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error { | ||
time.Sleep(time.Second) | ||
|
||
return e.Client.Update(ctx, obj, opts...) | ||
} | ||
|
||
func (e *e2eClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error { | ||
time.Sleep(time.Second) | ||
|
||
return e.Client.Patch(ctx, obj, patch, opts...) | ||
} | ||
|
||
func (e *e2eClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error { | ||
time.Sleep(time.Second) | ||
|
||
return e.Client.DeleteAllOf(ctx, obj, opts...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters