Skip to content

Commit 3683e0a

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#39610 from deads2k/generic-17-move-tests
Automatic merge from submit-queue move tests which need to stay in k8s.io/kubernetes for API scheme Preparatory for kubernetes#39475 to keep from having modify packages that will become read-only. It's a straight move of tests which have API scheme dependencies, but lived in the API machinery package.
2 parents 958466f + facc34f commit 3683e0a

17 files changed

+95
-78
lines changed

hack/.linted_packages

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ pkg/api/annotations
6868
pkg/api/errors
6969
pkg/api/events
7070
pkg/api/install
71-
pkg/api/meta
7271
pkg/api/resource
7372
pkg/api/service
7473
pkg/api/v1
@@ -90,7 +89,6 @@ pkg/apis/componentconfig/install
9089
pkg/apis/extensions/install
9190
pkg/apis/extensions/v1beta1
9291
pkg/apis/imagepolicy/install
93-
pkg/apis/meta/v1/unstructured
9492
pkg/apis/policy/install
9593
pkg/apis/rbac/install
9694
pkg/apis/rbac/v1alpha1
@@ -239,7 +237,6 @@ pkg/registry/thirdpartyresource
239237
pkg/registry/thirdpartyresource/etcd
240238
pkg/runtime
241239
pkg/runtime/serializer/json
242-
pkg/runtime/serializer/protobuf
243240
pkg/runtime/serializer/recognizer/testing
244241
pkg/runtime/serializer/versioning
245242
pkg/runtime/serializer/yaml

pkg/api/meta/BUILD

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -51,30 +51,6 @@ go_test(
5151
],
5252
)
5353

54-
go_test(
55-
name = "go_default_xtest",
56-
srcs = [
57-
"help_test.go",
58-
"meta_test.go",
59-
"scheme_test.go",
60-
],
61-
tags = ["automanaged"],
62-
deps = [
63-
"//pkg/api:go_default_library",
64-
"//pkg/api/meta:go_default_library",
65-
"//pkg/api/testapi:go_default_library",
66-
"//pkg/api/v1:go_default_library",
67-
"//pkg/apis/meta/v1:go_default_library",
68-
"//pkg/apis/meta/v1/unstructured:go_default_library",
69-
"//pkg/runtime:go_default_library",
70-
"//pkg/runtime/schema:go_default_library",
71-
"//pkg/types:go_default_library",
72-
"//pkg/util/diff:go_default_library",
73-
"//pkg/util/sets:go_default_library",
74-
"//vendor:github.com/google/gofuzz",
75-
],
76-
)
77-
7854
filegroup(
7955
name = "package-srcs",
8056
srcs = glob(["**"]),

pkg/apimachinery/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ filegroup(
4343
":package-srcs",
4444
"//pkg/apimachinery/announced:all-srcs",
4545
"//pkg/apimachinery/registered:all-srcs",
46+
"//pkg/apimachinery/tests:all-srcs",
4647
],
4748
tags = ["automanaged"],
4849
)

pkg/apimachinery/tests/BUILD

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
licenses(["notice"])
4+
5+
load(
6+
"@io_bazel_rules_go//go:def.bzl",
7+
"go_library",
8+
"go_test",
9+
)
10+
11+
go_test(
12+
name = "go_default_test",
13+
srcs = [
14+
"api_meta_help_test.go",
15+
"api_meta_meta_test.go",
16+
"api_meta_scheme_test.go",
17+
"apis_meta_v1_unstructed_unstructure_test.go",
18+
"runtime_helper_test.go",
19+
"runtime_serializer_protobuf_protobuf_test.go",
20+
"runtime_unversioned_test.go",
21+
"watch_until_test.go",
22+
],
23+
library = ":go_default_library",
24+
tags = ["automanaged"],
25+
deps = [
26+
"//pkg/api:go_default_library",
27+
"//pkg/api/install:go_default_library",
28+
"//pkg/api/meta:go_default_library",
29+
"//pkg/api/testapi:go_default_library",
30+
"//pkg/api/v1:go_default_library",
31+
"//pkg/api/validation:go_default_library",
32+
"//pkg/apimachinery/registered:go_default_library",
33+
"//pkg/apis/extensions:go_default_library",
34+
"//pkg/apis/meta/v1:go_default_library",
35+
"//pkg/apis/meta/v1/unstructured:go_default_library",
36+
"//pkg/runtime:go_default_library",
37+
"//pkg/runtime/schema:go_default_library",
38+
"//pkg/runtime/serializer/protobuf:go_default_library",
39+
"//pkg/types:go_default_library",
40+
"//pkg/util/diff:go_default_library",
41+
"//pkg/util/sets:go_default_library",
42+
"//pkg/util/wait:go_default_library",
43+
"//pkg/watch:go_default_library",
44+
"//vendor:github.com/google/gofuzz",
45+
],
46+
)
47+
48+
go_library(
49+
name = "go_default_library",
50+
srcs = ["doc.go"],
51+
tags = ["automanaged"],
52+
)
53+
54+
filegroup(
55+
name = "package-srcs",
56+
srcs = glob(["**"]),
57+
tags = ["automanaged"],
58+
visibility = ["//visibility:private"],
59+
)
60+
61+
filegroup(
62+
name = "all-srcs",
63+
srcs = [":package-srcs"],
64+
tags = ["automanaged"],
65+
)

pkg/api/meta/help_test.go renamed to pkg/apimachinery/tests/api_meta_help_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package meta_test
17+
package tests
1818

1919
import (
2020
"reflect"

pkg/api/meta/meta_test.go renamed to pkg/apimachinery/tests/api_meta_meta_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package meta_test
17+
package tests
1818

1919
import (
2020
"reflect"

pkg/api/meta/scheme_test.go renamed to pkg/apimachinery/tests/api_meta_scheme_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package meta_test
17+
package tests
1818

1919
import (
2020
"fmt"

pkg/apis/meta/v1/unstructured/unstructured_test.go renamed to pkg/apimachinery/tests/apis_meta_v1_unstructed_unstructure_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package unstructured_test
17+
package tests
1818

1919
import (
2020
"fmt"

pkg/apimachinery/tests/doc.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
Copyright 2017 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// This package runs tests against the apimachinery which require a Scheme
18+
// TODO Refactor the base types into the machinery and move these tests back.
19+
// See https://github.com/kubernetes/kubernetes/issues/39611
20+
package tests

pkg/runtime/helper_test.go renamed to pkg/apimachinery/tests/runtime_helper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package runtime_test
17+
package tests
1818

1919
import (
2020
"testing"

0 commit comments

Comments
 (0)