fix(deps): update module github.com/influxdata/influxdb-client-go/v2 to v2.13.0 (#4737)

* fix(deps): update module github.com/influxdata/influxdb-client-go/v2 to v2.13.0

* go mod tidy

* add new APIClient method to mock

* go mod tdiy

* go mod tidy again

* remove mocks

* update mockery and regenerate

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jliempt <>
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
Co-authored-by: Googlom <36107508+Googlom@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2024-01-22 14:54:34 +05:00
committed by GitHub
co-authored by renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> jliempt <> Gulom Alimov Googlom
parent 0117942d25
commit 0764534edb
7 changed files with 1337 additions and 401 deletions
File diff suppressed because it is too large Load Diff
+237
View File
@@ -0,0 +1,237 @@
// Code generated by mockery v2.40.1. DO NOT EDIT.
package mocks
import (
context "context"
write "github.com/influxdata/influxdb-client-go/v2/api/write"
mock "github.com/stretchr/testify/mock"
)
// WriteAPIBlocking is an autogenerated mock type for the WriteAPIBlocking type
type WriteAPIBlocking struct {
mock.Mock
}
type WriteAPIBlocking_Expecter struct {
mock *mock.Mock
}
func (_m *WriteAPIBlocking) EXPECT() *WriteAPIBlocking_Expecter {
return &WriteAPIBlocking_Expecter{mock: &_m.Mock}
}
// EnableBatching provides a mock function with given fields:
func (_m *WriteAPIBlocking) EnableBatching() {
_m.Called()
}
// WriteAPIBlocking_EnableBatching_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableBatching'
type WriteAPIBlocking_EnableBatching_Call struct {
*mock.Call
}
// EnableBatching is a helper method to define mock.On call
func (_e *WriteAPIBlocking_Expecter) EnableBatching() *WriteAPIBlocking_EnableBatching_Call {
return &WriteAPIBlocking_EnableBatching_Call{Call: _e.mock.On("EnableBatching")}
}
func (_c *WriteAPIBlocking_EnableBatching_Call) Run(run func()) *WriteAPIBlocking_EnableBatching_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *WriteAPIBlocking_EnableBatching_Call) Return() *WriteAPIBlocking_EnableBatching_Call {
_c.Call.Return()
return _c
}
func (_c *WriteAPIBlocking_EnableBatching_Call) RunAndReturn(run func()) *WriteAPIBlocking_EnableBatching_Call {
_c.Call.Return(run)
return _c
}
// Flush provides a mock function with given fields: ctx
func (_m *WriteAPIBlocking) Flush(ctx context.Context) error {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for Flush")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
// WriteAPIBlocking_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush'
type WriteAPIBlocking_Flush_Call struct {
*mock.Call
}
// Flush is a helper method to define mock.On call
// - ctx context.Context
func (_e *WriteAPIBlocking_Expecter) Flush(ctx interface{}) *WriteAPIBlocking_Flush_Call {
return &WriteAPIBlocking_Flush_Call{Call: _e.mock.On("Flush", ctx)}
}
func (_c *WriteAPIBlocking_Flush_Call) Run(run func(ctx context.Context)) *WriteAPIBlocking_Flush_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *WriteAPIBlocking_Flush_Call) Return(_a0 error) *WriteAPIBlocking_Flush_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *WriteAPIBlocking_Flush_Call) RunAndReturn(run func(context.Context) error) *WriteAPIBlocking_Flush_Call {
_c.Call.Return(run)
return _c
}
// WritePoint provides a mock function with given fields: ctx, point
func (_m *WriteAPIBlocking) WritePoint(ctx context.Context, point ...*write.Point) error {
_va := make([]interface{}, len(point))
for _i := range point {
_va[_i] = point[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for WritePoint")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, ...*write.Point) error); ok {
r0 = rf(ctx, point...)
} else {
r0 = ret.Error(0)
}
return r0
}
// WriteAPIBlocking_WritePoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WritePoint'
type WriteAPIBlocking_WritePoint_Call struct {
*mock.Call
}
// WritePoint is a helper method to define mock.On call
// - ctx context.Context
// - point ...*write.Point
func (_e *WriteAPIBlocking_Expecter) WritePoint(ctx interface{}, point ...interface{}) *WriteAPIBlocking_WritePoint_Call {
return &WriteAPIBlocking_WritePoint_Call{Call: _e.mock.On("WritePoint",
append([]interface{}{ctx}, point...)...)}
}
func (_c *WriteAPIBlocking_WritePoint_Call) Run(run func(ctx context.Context, point ...*write.Point)) *WriteAPIBlocking_WritePoint_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]*write.Point, len(args)-1)
for i, a := range args[1:] {
if a != nil {
variadicArgs[i] = a.(*write.Point)
}
}
run(args[0].(context.Context), variadicArgs...)
})
return _c
}
func (_c *WriteAPIBlocking_WritePoint_Call) Return(_a0 error) *WriteAPIBlocking_WritePoint_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *WriteAPIBlocking_WritePoint_Call) RunAndReturn(run func(context.Context, ...*write.Point) error) *WriteAPIBlocking_WritePoint_Call {
_c.Call.Return(run)
return _c
}
// WriteRecord provides a mock function with given fields: ctx, line
func (_m *WriteAPIBlocking) WriteRecord(ctx context.Context, line ...string) error {
_va := make([]interface{}, len(line))
for _i := range line {
_va[_i] = line[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for WriteRecord")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, ...string) error); ok {
r0 = rf(ctx, line...)
} else {
r0 = ret.Error(0)
}
return r0
}
// WriteAPIBlocking_WriteRecord_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteRecord'
type WriteAPIBlocking_WriteRecord_Call struct {
*mock.Call
}
// WriteRecord is a helper method to define mock.On call
// - ctx context.Context
// - line ...string
func (_e *WriteAPIBlocking_Expecter) WriteRecord(ctx interface{}, line ...interface{}) *WriteAPIBlocking_WriteRecord_Call {
return &WriteAPIBlocking_WriteRecord_Call{Call: _e.mock.On("WriteRecord",
append([]interface{}{ctx}, line...)...)}
}
func (_c *WriteAPIBlocking_WriteRecord_Call) Run(run func(ctx context.Context, line ...string)) *WriteAPIBlocking_WriteRecord_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]string, len(args)-1)
for i, a := range args[1:] {
if a != nil {
variadicArgs[i] = a.(string)
}
}
run(args[0].(context.Context), variadicArgs...)
})
return _c
}
func (_c *WriteAPIBlocking_WriteRecord_Call) Return(_a0 error) *WriteAPIBlocking_WriteRecord_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *WriteAPIBlocking_WriteRecord_Call) RunAndReturn(run func(context.Context, ...string) error) *WriteAPIBlocking_WriteRecord_Call {
_c.Call.Return(run)
return _c
}
// NewWriteAPIBlocking creates a new instance of WriteAPIBlocking. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewWriteAPIBlocking(t interface {
mock.TestingT
Cleanup(func())
}) *WriteAPIBlocking {
mock := &WriteAPIBlocking{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
-300
View File
@@ -1,300 +0,0 @@
// Code generated by mockery v2.7.4. DO NOT EDIT.
package mocks
import (
context "context"
api "github.com/influxdata/influxdb-client-go/v2/api"
domain "github.com/influxdata/influxdb-client-go/v2/domain"
http "github.com/influxdata/influxdb-client-go/v2/api/http"
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
mock "github.com/stretchr/testify/mock"
)
// Client is an autogenerated mock type for the Client type
type Client struct {
mock.Mock
}
// AuthorizationsAPI provides a mock function with given fields:
func (_m *Client) AuthorizationsAPI() api.AuthorizationsAPI {
ret := _m.Called()
var r0 api.AuthorizationsAPI
if rf, ok := ret.Get(0).(func() api.AuthorizationsAPI); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.AuthorizationsAPI)
}
}
return r0
}
// BucketsAPI provides a mock function with given fields:
func (_m *Client) BucketsAPI() api.BucketsAPI {
ret := _m.Called()
var r0 api.BucketsAPI
if rf, ok := ret.Get(0).(func() api.BucketsAPI); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.BucketsAPI)
}
}
return r0
}
// Close provides a mock function with given fields:
func (_m *Client) Close() {
_m.Called()
}
// DeleteAPI provides a mock function with given fields:
func (_m *Client) DeleteAPI() api.DeleteAPI {
ret := _m.Called()
var r0 api.DeleteAPI
if rf, ok := ret.Get(0).(func() api.DeleteAPI); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.DeleteAPI)
}
}
return r0
}
// HTTPService provides a mock function with given fields:
func (_m *Client) HTTPService() http.Service {
ret := _m.Called()
var r0 http.Service
if rf, ok := ret.Get(0).(func() http.Service); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(http.Service)
}
}
return r0
}
// Health provides a mock function with given fields: ctx
func (_m *Client) Health(ctx context.Context) (*domain.HealthCheck, error) {
ret := _m.Called(ctx)
var r0 *domain.HealthCheck
if rf, ok := ret.Get(0).(func(context.Context) *domain.HealthCheck); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*domain.HealthCheck)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// LabelsAPI provides a mock function with given fields:
func (_m *Client) LabelsAPI() api.LabelsAPI {
ret := _m.Called()
var r0 api.LabelsAPI
if rf, ok := ret.Get(0).(func() api.LabelsAPI); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.LabelsAPI)
}
}
return r0
}
// Options provides a mock function with given fields:
func (_m *Client) Options() *influxdb2.Options {
ret := _m.Called()
var r0 *influxdb2.Options
if rf, ok := ret.Get(0).(func() *influxdb2.Options); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*influxdb2.Options)
}
}
return r0
}
// OrganizationsAPI provides a mock function with given fields:
func (_m *Client) OrganizationsAPI() api.OrganizationsAPI {
ret := _m.Called()
var r0 api.OrganizationsAPI
if rf, ok := ret.Get(0).(func() api.OrganizationsAPI); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.OrganizationsAPI)
}
}
return r0
}
// QueryAPI provides a mock function with given fields: org
func (_m *Client) QueryAPI(org string) api.QueryAPI {
ret := _m.Called(org)
var r0 api.QueryAPI
if rf, ok := ret.Get(0).(func(string) api.QueryAPI); ok {
r0 = rf(org)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.QueryAPI)
}
}
return r0
}
// Ready provides a mock function with given fields: ctx
func (_m *Client) Ready(ctx context.Context) (bool, error) {
ret := _m.Called(ctx)
var r0 bool
if rf, ok := ret.Get(0).(func(context.Context) bool); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ServerURL provides a mock function with given fields:
func (_m *Client) ServerURL() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// Setup provides a mock function with given fields: ctx, username, password, org, bucket, retentionPeriodHours
func (_m *Client) Setup(ctx context.Context, username string, password string, org string, bucket string, retentionPeriodHours int) (*domain.OnboardingResponse, error) {
ret := _m.Called(ctx, username, password, org, bucket, retentionPeriodHours)
var r0 *domain.OnboardingResponse
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, int) *domain.OnboardingResponse); ok {
r0 = rf(ctx, username, password, org, bucket, retentionPeriodHours)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*domain.OnboardingResponse)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, int) error); ok {
r1 = rf(ctx, username, password, org, bucket, retentionPeriodHours)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// TasksAPI provides a mock function with given fields:
func (_m *Client) TasksAPI() api.TasksAPI {
ret := _m.Called()
var r0 api.TasksAPI
if rf, ok := ret.Get(0).(func() api.TasksAPI); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.TasksAPI)
}
}
return r0
}
// UsersAPI provides a mock function with given fields:
func (_m *Client) UsersAPI() api.UsersAPI {
ret := _m.Called()
var r0 api.UsersAPI
if rf, ok := ret.Get(0).(func() api.UsersAPI); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.UsersAPI)
}
}
return r0
}
// WriteAPI provides a mock function with given fields: org, bucket
func (_m *Client) WriteAPI(org string, bucket string) api.WriteAPI {
ret := _m.Called(org, bucket)
var r0 api.WriteAPI
if rf, ok := ret.Get(0).(func(string, string) api.WriteAPI); ok {
r0 = rf(org, bucket)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.WriteAPI)
}
}
return r0
}
// WriteAPIBlocking provides a mock function with given fields: org, bucket
func (_m *Client) WriteAPIBlocking(org string, bucket string) api.WriteAPIBlocking {
ret := _m.Called(org, bucket)
var r0 api.WriteAPIBlocking
if rf, ok := ret.Get(0).(func(string, string) api.WriteAPIBlocking); ok {
r0 = rf(org, bucket)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(api.WriteAPIBlocking)
}
}
return r0
}
-57
View File
@@ -1,57 +0,0 @@
// Code generated by mockery v2.7.4. DO NOT EDIT.
package mocks
import (
context "context"
write "github.com/influxdata/influxdb-client-go/v2/api/write"
mock "github.com/stretchr/testify/mock"
)
// WriteAPIBlocking is an autogenerated mock type for the WriteAPIBlocking type
type WriteAPIBlocking struct {
mock.Mock
}
// WritePoint provides a mock function with given fields: ctx, point
func (_m *WriteAPIBlocking) WritePoint(ctx context.Context, point ...*write.Point) error {
_va := make([]interface{}, len(point))
for _i := range point {
_va[_i] = point[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, ...*write.Point) error); ok {
r0 = rf(ctx, point...)
} else {
r0 = ret.Error(0)
}
return r0
}
// WriteRecord provides a mock function with given fields: ctx, line
func (_m *WriteAPIBlocking) WriteRecord(ctx context.Context, line ...string) error {
_va := make([]interface{}, len(line))
for _i := range line {
_va[_i] = line[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, ...string) error); ok {
r0 = rf(ctx, line...)
} else {
r0 = ret.Error(0)
}
return r0
}