mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Storage: Add DualWriter improvements (#85968)
* Add Create tests * Adjust mode 2 and mode 3 Get behavior --------- Co-authored-by: Dan Cech <dcech@grafana.com>
This commit is contained in:
@@ -59,7 +59,7 @@ type spyLegacyStorageShim struct {
|
||||
func (c *spyStorageClient) Create(ctx context.Context, obj runtime.Object, valitation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) {
|
||||
c.spy.record("Storage.Create")
|
||||
klog.Info("method: Storage.Create")
|
||||
return nil, nil
|
||||
return &dummyObject{}, nil
|
||||
}
|
||||
|
||||
func (c *spyStorageClient) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
|
||||
@@ -137,7 +137,7 @@ func (c *spyLegacyStorageClient) Counts(method string) int {
|
||||
func (c *spyLegacyStorageClient) Create(ctx context.Context, obj runtime.Object, valitation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) {
|
||||
c.spy.record("LegacyStorage.Create")
|
||||
klog.Info("method: LegacyStorage.Create")
|
||||
return nil, nil
|
||||
return &dummyObject{}, nil
|
||||
}
|
||||
|
||||
func (c *spyLegacyStorageClient) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
|
||||
|
||||
Reference in New Issue
Block a user