1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

Merge pull request #1083 from fmuyassarov/mockery

codegen: fix code-generation
This commit is contained in:
Kubernetes Prow Robot 2023-03-15 06:46:16 -07:00 committed by GitHub
commit a06e44ef0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 69 additions and 45 deletions

View file

@ -2,7 +2,7 @@ ARG BUILDER_IMAGE
FROM ${BUILDER_IMAGE} as builder
# Install tools
RUN go install github.com/vektra/mockery/v2@v2.13.0 && \
RUN go install github.com/vektra/mockery/v2@v2.20.0 && \
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2 && \
git clone https://github.com/kubernetes/code-generator -b v0.24.3 --depth 1 && \
go install k8s.io/code-generator/cmd/...@v0.24.3 && \

View file

@ -3,6 +3,9 @@ set -o pipefail
# Default path for code-generator repo
K8S_CODE_GENERATOR=${K8S_CODE_GENERATOR:-../code-generator}
# Omit version control information (buildvcs)
export GOENV="/go/env"
go env -w GOFLAGS="-buildvcs=false"
go mod vendor

View file

@ -1,4 +1,4 @@
// Code generated by mockery v2.13.0. DO NOT EDIT.
// Code generated by mockery v2.20.0. DO NOT EDIT.
package apihelper
@ -21,6 +21,10 @@ func (_m *MockAPIHelpers) GetClient() (*kubernetes.Clientset, error) {
ret := _m.Called()
var r0 *kubernetes.Clientset
var r1 error
if rf, ok := ret.Get(0).(func() (*kubernetes.Clientset, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() *kubernetes.Clientset); ok {
r0 = rf()
} else {
@ -29,7 +33,6 @@ func (_m *MockAPIHelpers) GetClient() (*kubernetes.Clientset, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
@ -44,6 +47,10 @@ func (_m *MockAPIHelpers) GetNode(_a0 *kubernetes.Clientset, _a1 string) (*v1.No
ret := _m.Called(_a0, _a1)
var r0 *v1.Node
var r1 error
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset, string) (*v1.Node, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset, string) *v1.Node); ok {
r0 = rf(_a0, _a1)
} else {
@ -52,7 +59,6 @@ func (_m *MockAPIHelpers) GetNode(_a0 *kubernetes.Clientset, _a1 string) (*v1.No
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*kubernetes.Clientset, string) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -67,6 +73,10 @@ func (_m *MockAPIHelpers) GetNodes(_a0 *kubernetes.Clientset) (*v1.NodeList, err
ret := _m.Called(_a0)
var r0 *v1.NodeList
var r1 error
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset) (*v1.NodeList, error)); ok {
return rf(_a0)
}
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset) *v1.NodeList); ok {
r0 = rf(_a0)
} else {
@ -75,7 +85,6 @@ func (_m *MockAPIHelpers) GetNodes(_a0 *kubernetes.Clientset) (*v1.NodeList, err
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*kubernetes.Clientset) error); ok {
r1 = rf(_a0)
} else {
@ -90,6 +99,10 @@ func (_m *MockAPIHelpers) GetPod(_a0 *kubernetes.Clientset, _a1 string, _a2 stri
ret := _m.Called(_a0, _a1, _a2)
var r0 *v1.Pod
var r1 error
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset, string, string) (*v1.Pod, error)); ok {
return rf(_a0, _a1, _a2)
}
if rf, ok := ret.Get(0).(func(*kubernetes.Clientset, string, string) *v1.Pod); ok {
r0 = rf(_a0, _a1, _a2)
} else {
@ -98,7 +111,6 @@ func (_m *MockAPIHelpers) GetPod(_a0 *kubernetes.Clientset, _a1 string, _a2 stri
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*kubernetes.Clientset, string, string) error); ok {
r1 = rf(_a0, _a1, _a2)
} else {
@ -113,6 +125,10 @@ func (_m *MockAPIHelpers) GetTopologyClient() (*versioned.Clientset, error) {
ret := _m.Called()
var r0 *versioned.Clientset
var r1 error
if rf, ok := ret.Get(0).(func() (*versioned.Clientset, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() *versioned.Clientset); ok {
r0 = rf()
} else {
@ -121,7 +137,6 @@ func (_m *MockAPIHelpers) GetTopologyClient() (*versioned.Clientset, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
@ -173,13 +188,13 @@ func (_m *MockAPIHelpers) UpdateNode(_a0 *kubernetes.Clientset, _a1 *v1.Node) er
return r0
}
type NewMockAPIHelpersT interface {
type mockConstructorTestingTNewMockAPIHelpers interface {
mock.TestingT
Cleanup(func())
}
// NewMockAPIHelpers creates a new instance of MockAPIHelpers. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockAPIHelpers(t NewMockAPIHelpersT) *MockAPIHelpers {
func NewMockAPIHelpers(t mockConstructorTestingTNewMockAPIHelpers) *MockAPIHelpers {
mock := &MockAPIHelpers{}
mock.Mock.Test(t)

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,4 +1,4 @@
// Code generated by mockery v2.13.0. DO NOT EDIT.
// Code generated by mockery v2.20.0. DO NOT EDIT.
package labeler
@ -27,6 +27,10 @@ func (_m *MockLabelerClient) SetLabels(ctx context.Context, in *SetLabelsRequest
ret := _m.Called(_ca...)
var r0 *SetLabelsReply
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *SetLabelsRequest, ...grpc.CallOption) (*SetLabelsReply, error)); ok {
return rf(ctx, in, opts...)
}
if rf, ok := ret.Get(0).(func(context.Context, *SetLabelsRequest, ...grpc.CallOption) *SetLabelsReply); ok {
r0 = rf(ctx, in, opts...)
} else {
@ -35,7 +39,6 @@ func (_m *MockLabelerClient) SetLabels(ctx context.Context, in *SetLabelsRequest
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *SetLabelsRequest, ...grpc.CallOption) error); ok {
r1 = rf(ctx, in, opts...)
} else {
@ -45,13 +48,13 @@ func (_m *MockLabelerClient) SetLabels(ctx context.Context, in *SetLabelsRequest
return r0, r1
}
type NewMockLabelerClientT interface {
type mockConstructorTestingTNewMockLabelerClient interface {
mock.TestingT
Cleanup(func())
}
// NewMockLabelerClient creates a new instance of MockLabelerClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockLabelerClient(t NewMockLabelerClientT) *MockLabelerClient {
func NewMockLabelerClient(t mockConstructorTestingTNewMockLabelerClient) *MockLabelerClient {
mock := &MockLabelerClient{}
mock.Mock.Test(t)

View file

@ -1,4 +1,4 @@
// Code generated by mockery v2.13.0. DO NOT EDIT.
// Code generated by mockery v2.20.0. DO NOT EDIT.
package source
@ -14,6 +14,10 @@ func (_m *MockLabelSource) GetLabels() (FeatureLabels, error) {
ret := _m.Called()
var r0 FeatureLabels
var r1 error
if rf, ok := ret.Get(0).(func() (FeatureLabels, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() FeatureLabels); ok {
r0 = rf()
} else {
@ -22,7 +26,6 @@ func (_m *MockLabelSource) GetLabels() (FeatureLabels, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
@ -60,13 +63,13 @@ func (_m *MockLabelSource) Priority() int {
return r0
}
type NewMockLabelSourceT interface {
type mockConstructorTestingTNewMockLabelSource interface {
mock.TestingT
Cleanup(func())
}
// NewMockLabelSource creates a new instance of MockLabelSource. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockLabelSource(t NewMockLabelSourceT) *MockLabelSource {
func NewMockLabelSource(t mockConstructorTestingTNewMockLabelSource) *MockLabelSource {
mock := &MockLabelSource{}
mock.Mock.Test(t)