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
feb43c5e
Commit
feb43c5e
authored
May 17, 2016
by
Maciej Szulik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reapply ScheduledJob tests (
2ab885a5
)
parent
631772bd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
9 deletions
+25
-9
test-go.sh
hack/test-go.sh
+2
-0
test-integration.sh
hack/test-integration.sh
+2
-0
testapi.go
pkg/api/testapi/testapi.go
+0
-0
fuzzer.go
pkg/api/testing/fuzzer.go
+4
-0
master_test.go
pkg/master/master_test.go
+13
-9
master_test.go
test/integration/master_test.go
+4
-0
No files found.
hack/test-go.sh
View file @
feb43c5e
...
...
@@ -58,6 +58,8 @@ 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"
# FIXME: due to current implementation of a test client (see: pkg/api/testapi/testapi.go)
# ONLY the last version is tested in each group.
KUBE_TEST_API_VERSIONS
=
${
KUBE_TEST_API_VERSIONS
:-
"v1,autoscaling/v1,batch/v1,batch/v2alpha1,extensions/v1beta1,apps/v1alpha1,federation/v1alpha1,policy/v1alpha1,rbac.authorization.k8s.io/v1alpha1"
}
# once we have multiple group supports
# Create a junit-style XML test report in this directory if set.
...
...
hack/test-integration.sh
View file @
feb43c5e
...
...
@@ -29,6 +29,8 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
# "v1,compute/v1alpha1,experimental/v1alpha2;v1,compute/v2,experimental/v1alpha3"
# TODO: It's going to be:
# KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,extensions/v1beta1"}
# FIXME: due to current implementation of a test client (see: pkg/api/testapi/testapi.go)
# ONLY the last version is tested in each group.
KUBE_TEST_API_VERSIONS
=
${
KUBE_TEST_API_VERSIONS
:-
"v1,autoscaling/v1,batch/v1,apps/v1alpha1,policy/v1alpha1,extensions/v1beta1,rbac.authorization.k8s.io/v1alpha1"
}
# Give integration tests longer to run
...
...
pkg/api/testapi/testapi.go
View file @
feb43c5e
This diff is collapsed.
Click to expand it.
pkg/api/testing/fuzzer.go
View file @
feb43c5e
...
...
@@ -169,6 +169,10 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source)
j
.
ManualSelector
=
nil
}
},
func
(
cp
*
batch
.
ConcurrencyPolicy
,
c
fuzz
.
Continue
)
{
policies
:=
[]
batch
.
ConcurrencyPolicy
{
batch
.
AllowConcurrent
,
batch
.
ForbidConcurrent
,
batch
.
ReplaceConcurrent
}
*
cp
=
policies
[
c
.
Rand
.
Intn
(
len
(
policies
))]
},
func
(
j
*
api
.
List
,
c
fuzz
.
Continue
)
{
c
.
FuzzNoCustom
(
j
)
// fuzz self without calling this function again
// TODO: uncomment when round trip starts from a versioned object
...
...
pkg/master/master_test.go
View file @
feb43c5e
...
...
@@ -429,6 +429,19 @@ func TestDiscoveryAtAPIS(t *testing.T) {
Version
:
testapi
.
Autoscaling
.
GroupVersion
()
.
Version
,
},
},
// batch is using its pkg/apis/batch/ types here since during installation
// both versions get installed and testapi.go currently does not support
// multi-versioned clients
batch
.
GroupName
:
{
{
GroupVersion
:
batchapiv1
.
SchemeGroupVersion
.
String
(),
Version
:
batchapiv1
.
SchemeGroupVersion
.
Version
,
},
{
GroupVersion
:
batchapiv2alpha1
.
SchemeGroupVersion
.
String
(),
Version
:
batchapiv2alpha1
.
SchemeGroupVersion
.
Version
,
},
},
apps
.
GroupName
:
{
{
GroupVersion
:
testapi
.
Apps
.
GroupVersion
()
.
String
(),
...
...
@@ -442,15 +455,6 @@ 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
(),
...
...
test/integration/master_test.go
View file @
feb43c5e
...
...
@@ -33,6 +33,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
"k8s.io/kubernetes/pkg/client/restclient"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/master"
...
...
@@ -257,6 +258,9 @@ var deleteResp string = `
// Job share storage. This test can be deleted when Jobs is removed from ext/v1beta1,
// (expected to happen in 1.4).
func
TestBatchGroupBackwardCompatibility
(
t
*
testing
.
T
)
{
if
*
testapi
.
Batch
.
GroupVersion
()
==
v2alpha1
.
SchemeGroupVersion
{
t
.
Skip
(
"Shared job storage is not required for batch/v2alpha1."
)
}
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
transport
:=
http
.
DefaultTransport
...
...
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