Commit 2ab885a5 authored by Maciej Szulik's avatar Maciej Szulik

Revert commit a31ca0dc and move batch/v2alpha1…

Revert commit a31ca0dc and move batch/v2alpha1 tests to separate group in KUBE_TEST_API_VERSIONS
parent c88c9584
...@@ -58,7 +58,7 @@ KUBE_GOVERALLS_BIN=${KUBE_GOVERALLS_BIN:-} ...@@ -58,7 +58,7 @@ KUBE_GOVERALLS_BIN=${KUBE_GOVERALLS_BIN:-}
# Lists of API Versions of each groups that should be tested, groups are # Lists of API Versions of each groups that should be tested, groups are
# separated by comma, lists are separated by semicolon. e.g., # separated by comma, lists are separated by semicolon. e.g.,
# "v1,compute/v1alpha1,experimental/v1alpha2;v1,compute/v2,experimental/v1alpha3" # "v1,compute/v1alpha1,experimental/v1alpha2;v1,compute/v2,experimental/v1alpha3"
KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,extensions/v1beta1,federation/v1alpha1;v1,autoscaling/v1,batch/v1,batch/v2alpha1,extensions/v1beta1,apps/v1alpha1,federation/v1alpha1,policy/v1alpha1,rbac.authorization.k8s.io/v1alpha1"} KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"batch/v1;batch/v2alpha1"}
# once we have multiple group supports # once we have multiple group supports
# Run tests with the standard (registry) etcd prefix. # Run tests with the standard (registry) etcd prefix.
KUBE_TEST_ETCD_PREFIXES=${KUBE_TEST_ETCD_PREFIXES:-"registry"} KUBE_TEST_ETCD_PREFIXES=${KUBE_TEST_ETCD_PREFIXES:-"registry"}
......
...@@ -29,7 +29,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh" ...@@ -29,7 +29,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
# "v1,compute/v1alpha1,experimental/v1alpha2;v1,compute/v2,experimental/v1alpha3" # "v1,compute/v1alpha1,experimental/v1alpha2;v1,compute/v2,experimental/v1alpha3"
# TODO: It's going to be: # TODO: It's going to be:
# KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,extensions/v1beta1"} # KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,extensions/v1beta1"}
KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,extensions/v1beta1;v1,autoscaling/v1,batch/v1,apps/v1alpha1,policy/v1alpha1,extensions/v1beta1,rbac.authorization.k8s.io/v1alpha1"} KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"batch/v1;batch/v2alpha1"}
# Give integration tests longer to run # Give integration tests longer to run
# TODO: allow a larger value to be passed in # TODO: allow a larger value to be passed in
......
...@@ -169,6 +169,10 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source) ...@@ -169,6 +169,10 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source)
j.ManualSelector = nil 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) { func(j *api.List, c fuzz.Continue) {
c.FuzzNoCustom(j) // fuzz self without calling this function again c.FuzzNoCustom(j) // fuzz self without calling this function again
// TODO: uncomment when round trip starts from a versioned object // TODO: uncomment when round trip starts from a versioned object
......
...@@ -430,6 +430,19 @@ func TestDiscoveryAtAPIS(t *testing.T) { ...@@ -430,6 +430,19 @@ func TestDiscoveryAtAPIS(t *testing.T) {
Version: testapi.Autoscaling.GroupVersion().Version, 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: { apps.GroupName: {
{ {
GroupVersion: testapi.Apps.GroupVersion().String(), GroupVersion: testapi.Apps.GroupVersion().String(),
...@@ -443,15 +456,6 @@ func TestDiscoveryAtAPIS(t *testing.T) { ...@@ -443,15 +456,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{ expectPreferredVersion := map[string]unversioned.GroupVersionForDiscovery{
autoscaling.GroupName: { autoscaling.GroupName: {
GroupVersion: registered.GroupOrDie(autoscaling.GroupName).GroupVersion.String(), GroupVersion: registered.GroupOrDie(autoscaling.GroupName).GroupVersion.String(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment