Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a31ca0dc
Commit
a31ca0dc
authored
Apr 28, 2016
by
Maciej Szulik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable batch/v2alpha1 tests
parent
df11a51b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
test-go.sh
hack/test-go.sh
+1
-1
testapi.go
pkg/api/testapi/testapi.go
+0
-0
master_test.go
pkg/master/master_test.go
+13
-7
No files found.
hack/test-go.sh
View file @
a31ca0dc
...
...
@@ -58,7 +58,7 @@ KUBE_GOVERALLS_BIN=${KUBE_GOVERALLS_BIN:-}
# Lists of API Versions of each groups that should be tested, groups are
# separated by comma, lists are separated by semicolon. e.g.,
# "v1,compute/v1alpha1,experimental/v1alpha2;v1,compute/v2,experimental/v1alpha3"
KUBE_TEST_API_VERSIONS
=
${
KUBE_TEST_API_VERSIONS
:-
"v1,extensions/v1beta1,metrics/v1alpha1,federation/v1alpha1;v1,autoscaling/v1,batch/v1,extensions/v1beta1,apps/v1alpha1,metrics/v1alpha1,federation/v1alpha1,policy/v1alpha1"
}
KUBE_TEST_API_VERSIONS
=
${
KUBE_TEST_API_VERSIONS
:-
"v1,extensions/v1beta1,metrics/v1alpha1,federation/v1alpha1;v1,autoscaling/v1,batch/v1,
batch/v2alpha1,
extensions/v1beta1,apps/v1alpha1,metrics/v1alpha1,federation/v1alpha1,policy/v1alpha1"
}
# once we have multiple group supports
# Run tests with the standard (registry) and a custom etcd prefix
# (kubernetes.io/registry).
...
...
pkg/api/testapi/testapi.go
View file @
a31ca0dc
This diff is collapsed.
Click to expand it.
pkg/master/master_test.go
View file @
a31ca0dc
...
...
@@ -40,6 +40,7 @@ import (
autoscalingapiv1
"k8s.io/kubernetes/pkg/apis/autoscaling/v1"
"k8s.io/kubernetes/pkg/apis/batch"
batchapiv1
"k8s.io/kubernetes/pkg/apis/batch/v1"
batchapiv2alpha1
"k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
"k8s.io/kubernetes/pkg/apis/extensions"
extensionsapiv1beta1
"k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
"k8s.io/kubernetes/pkg/apiserver"
...
...
@@ -128,7 +129,9 @@ func newMaster(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *ass
// limitedAPIResourceConfigSource only enables the core group, the extensions group, the batch group, and the autoscaling group.
func
limitedAPIResourceConfigSource
()
*
genericapiserver
.
ResourceConfig
{
ret
:=
genericapiserver
.
NewResourceConfig
()
ret
.
EnableVersions
(
apiv1
.
SchemeGroupVersion
,
extensionsapiv1beta1
.
SchemeGroupVersion
,
batchapiv1
.
SchemeGroupVersion
,
appsapi
.
SchemeGroupVersion
,
autoscalingapiv1
.
SchemeGroupVersion
)
ret
.
EnableVersions
(
apiv1
.
SchemeGroupVersion
,
extensionsapiv1beta1
.
SchemeGroupVersion
,
batchapiv1
.
SchemeGroupVersion
,
batchapiv2alpha1
.
SchemeGroupVersion
,
appsapi
.
SchemeGroupVersion
,
autoscalingapiv1
.
SchemeGroupVersion
)
return
ret
}
...
...
@@ -423,12 +426,6 @@ func TestDiscoveryAtAPIS(t *testing.T) {
Version
:
testapi
.
Autoscaling
.
GroupVersion
()
.
Version
,
},
},
batch
.
GroupName
:
{
{
GroupVersion
:
testapi
.
Batch
.
GroupVersion
()
.
String
(),
Version
:
testapi
.
Batch
.
GroupVersion
()
.
Version
,
},
},
apps
.
GroupName
:
{
{
GroupVersion
:
testapi
.
Apps
.
GroupVersion
()
.
String
(),
...
...
@@ -442,6 +439,15 @@ func TestDiscoveryAtAPIS(t *testing.T) {
},
},
}
var
batchVersions
[]
unversioned
.
GroupVersionForDiscovery
for
_
,
gv
:=
range
testapi
.
Batch
.
GroupVersions
()
{
batchVersions
=
append
(
batchVersions
,
unversioned
.
GroupVersionForDiscovery
{
GroupVersion
:
gv
.
String
(),
Version
:
gv
.
Version
,
})
}
expectVersions
[
batch
.
GroupName
]
=
batchVersions
expectPreferredVersion
:=
map
[
string
]
unversioned
.
GroupVersionForDiscovery
{
autoscaling
.
GroupName
:
{
GroupVersion
:
registered
.
GroupOrDie
(
autoscaling
.
GroupName
)
.
GroupVersion
.
String
(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment