mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
kube-gen: fixup moved tests
This commit is contained in:
parent
86ca7fbd92
commit
98042b77f3
@ -772,13 +772,13 @@ staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd
|
||||
staging/src/k8s.io/kube-gen/cmd/client-gen/args
|
||||
staging/src/k8s.io/kube-gen/cmd/client-gen/generators/fake
|
||||
staging/src/k8s.io/kube-gen/cmd/client-gen/generators/scheme
|
||||
staging/src/k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup
|
||||
staging/src/k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup/v1
|
||||
staging/src/k8s.io/kube-gen/cmd/client-gen/types
|
||||
staging/src/k8s.io/kube-gen/cmd/conversion-gen/generators
|
||||
staging/src/k8s.io/kube-gen/cmd/go-to-protobuf/protobuf
|
||||
staging/src/k8s.io/kube-gen/cmd/informer-gen/generators
|
||||
staging/src/k8s.io/kube-gen/cmd/lister-gen/generators
|
||||
staging/src/k8s.io/kube-gen/test/apis/testgroup
|
||||
staging/src/k8s.io/kube-gen/test/apis/testgroup/v1
|
||||
staging/src/k8s.io/metrics/pkg/apis/custom_metrics
|
||||
staging/src/k8s.io/metrics/pkg/apis/custom_metrics/v1alpha1
|
||||
staging/src/k8s.io/metrics/pkg/apis/metrics
|
||||
|
@ -51,7 +51,7 @@ openapi_library(
|
||||
"k8s.io/apiserver/pkg/apis/example/v1",
|
||||
"k8s.io/client-go/pkg/version",
|
||||
"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1",
|
||||
"k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup/v1",
|
||||
"k8s.io/kube-gen/test/apis/testgroup/v1",
|
||||
"k8s.io/metrics/pkg/apis/custom_metrics/v1alpha1",
|
||||
"k8s.io/metrics/pkg/apis/metrics/v1alpha1",
|
||||
],
|
||||
|
@ -1 +0,0 @@
|
||||
{}
|
@ -172,15 +172,15 @@ func main() {
|
||||
|
||||
if *test {
|
||||
arguments.InputDirs = append(dependencies, []string{
|
||||
"k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup",
|
||||
"k8s.io/kube-gen/test/apis/testgroup",
|
||||
}...)
|
||||
arguments.CustomArgs = clientgenargs.Args{
|
||||
Groups: []types.GroupVersions{{Group: "testgroup", Versions: []types.Version{""}}},
|
||||
GroupVersionToInputPath: map[types.GroupVersion]string{
|
||||
{Group: "testgroup", Version: ""}: "k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup",
|
||||
{Group: "testgroup", Version: ""}: "k8s.io/kube-gen/test/apis/testgroup",
|
||||
},
|
||||
ClientsetName: "test_internalclientset",
|
||||
ClientsetOutputPath: "k8s.io/kube-gen/cmd/client-gen/testoutput/clientset_generated/",
|
||||
ClientsetOutputPath: "k8s.io/kube-gen/test/clientset/internal",
|
||||
ClientsetOnly: false,
|
||||
FakeClient: true,
|
||||
CmdArgs: cmdArgs,
|
||||
|
@ -16,4 +16,4 @@ limitations under the License.
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +groupName=testgroup.k8s.io
|
||||
package testgroup // import "k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup"
|
||||
package testgroup // import "k8s.io/kube-gen/test/apis/testgroup"
|
||||
|
@ -22,8 +22,8 @@ import (
|
||||
"k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||
"k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup"
|
||||
"k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup/v1"
|
||||
"k8s.io/kube-gen/test/apis/testgroup"
|
||||
"k8s.io/kube-gen/test/apis/testgroup/v1"
|
||||
)
|
||||
|
||||
// Install registers the API group and adds types to a scheme
|
||||
@ -32,7 +32,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
|
||||
&announced.GroupMetaFactoryArgs{
|
||||
GroupName: testgroup.SchemeGroupVersion.Group,
|
||||
VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version},
|
||||
ImportPrefix: "k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup",
|
||||
ImportPrefix: "k8s.io/kube-gen/test/apis/testgroup",
|
||||
AddInternalObjectsToScheme: testgroup.AddToScheme,
|
||||
},
|
||||
announced.VersionToSchemeFunc{
|
||||
|
@ -14,14 +14,14 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package test_internalclientset
|
||||
package internal
|
||||
|
||||
import (
|
||||
glog "github.com/golang/glog"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
testgroupinternalversion "k8s.io/kube-gen/cmd/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion"
|
||||
testgroupinternalversion "k8s.io/kube-gen/test/clientset/internal/typed/testgroup/internalversion"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
|
@ -17,4 +17,4 @@ limitations under the License.
|
||||
// This package is generated by client-gen with custom arguments.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package test_internalclientset
|
||||
package internal
|
||||
|
@ -22,9 +22,9 @@ import (
|
||||
"k8s.io/client-go/discovery"
|
||||
fakediscovery "k8s.io/client-go/discovery/fake"
|
||||
"k8s.io/client-go/testing"
|
||||
clientset "k8s.io/kube-gen/cmd/client-gen/testoutput/clientset_generated/test_internalclientset"
|
||||
testgroupinternalversion "k8s.io/kube-gen/cmd/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion"
|
||||
faketestgroupinternalversion "k8s.io/kube-gen/cmd/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake"
|
||||
clientset "k8s.io/kube-gen/test/clientset/internal"
|
||||
testgroupinternalversion "k8s.io/kube-gen/test/clientset/internal/typed/testgroup/internalversion"
|
||||
faketestgroupinternalversion "k8s.io/kube-gen/test/clientset/internal/typed/testgroup/internalversion/fake"
|
||||
)
|
||||
|
||||
// NewSimpleClientset returns a clientset that will respond with the provided objects.
|
||||
|
@ -21,7 +21,7 @@ import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
testgroupinternalversion "k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup"
|
||||
testgroupinternalversion "k8s.io/kube-gen/test/apis/testgroup"
|
||||
)
|
||||
|
||||
var scheme = runtime.NewScheme()
|
||||
|
@ -23,7 +23,7 @@ import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
testgroup "k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup/install"
|
||||
testgroup "k8s.io/kube-gen/test/apis/testgroup/install"
|
||||
os "os"
|
||||
)
|
||||
|
||||
|
@ -19,7 +19,7 @@ package fake
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
internalversion "k8s.io/kube-gen/cmd/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion"
|
||||
internalversion "k8s.io/kube-gen/test/clientset/internal/typed/testgroup/internalversion"
|
||||
)
|
||||
|
||||
type FakeTestgroup struct {
|
||||
|
@ -23,7 +23,7 @@ import (
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
testgroup "k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup"
|
||||
testgroup "k8s.io/kube-gen/test/apis/testgroup"
|
||||
)
|
||||
|
||||
// FakeTestTypes implements TestTypeInterface
|
||||
|
@ -18,7 +18,7 @@ package internalversion
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
"k8s.io/kube-gen/cmd/client-gen/testoutput/clientset_generated/test_internalclientset/scheme"
|
||||
"k8s.io/kube-gen/test/clientset/internal/scheme"
|
||||
)
|
||||
|
||||
type TestgroupInterface interface {
|
||||
|
@ -21,8 +21,8 @@ import (
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testgroup "k8s.io/kube-gen/cmd/client-gen/test_apis/testgroup"
|
||||
scheme "k8s.io/kube-gen/cmd/client-gen/testoutput/clientset_generated/test_internalclientset/scheme"
|
||||
testgroup "k8s.io/kube-gen/test/apis/testgroup"
|
||||
scheme "k8s.io/kube-gen/test/clientset/internal/scheme"
|
||||
)
|
||||
|
||||
// TestTypesGetter has a method to return a TestTypeInterface.
|
||||
|
Loading…
Reference in New Issue
Block a user