mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Fix test and reorder initialization of groups
Delete a job scale test A subsequent PR is going to remove support for this anyways. Initialize extensions before batch and autoscaling per @lavalamp review suggestion.
This commit is contained in:
parent
175addf2a3
commit
3433d50bc3
@ -242,7 +242,6 @@ runTests() {
|
||||
hpa_min_field=".spec.minReplicas"
|
||||
hpa_max_field=".spec.maxReplicas"
|
||||
hpa_cpu_field=".spec.cpuUtilization.targetPercentage"
|
||||
job_parallelism_field=".spec.parallelism"
|
||||
deployment_replicas=".spec.replicas"
|
||||
secret_data=".data"
|
||||
secret_type=".type"
|
||||
@ -1048,10 +1047,7 @@ __EOF__
|
||||
|
||||
### Scale a job
|
||||
kubectl create -f docs/user-guide/job.yaml "${kube_flags[@]}"
|
||||
# Command
|
||||
kubectl scale --replicas=2 job/pi
|
||||
# Post-condition: 2 replicas for pi
|
||||
kube::test::get_object_assert 'job pi' "{{$job_parallelism_field}}" '2'
|
||||
# Job scale support removed.
|
||||
# Clean-up
|
||||
kubectl delete job/pi "${kube_flags[@]}"
|
||||
|
||||
|
@ -75,6 +75,12 @@ func init() {
|
||||
internalGroupVersion: api.SchemeGroupVersion,
|
||||
}
|
||||
}
|
||||
if _, ok := Groups[extensions.GroupName]; !ok {
|
||||
Groups[extensions.GroupName] = TestGroup{
|
||||
externalGroupVersion: unversioned.GroupVersion{Group: extensions.GroupName, Version: registered.GroupOrDie(extensions.GroupName).GroupVersion.Version},
|
||||
internalGroupVersion: extensions.SchemeGroupVersion,
|
||||
}
|
||||
}
|
||||
if _, ok := Groups[autoscaling.GroupName]; !ok {
|
||||
Groups[autoscaling.GroupName] = TestGroup{
|
||||
externalGroupVersion: unversioned.GroupVersion{Group: autoscaling.GroupName, Version: registered.GroupOrDie(autoscaling.GroupName).GroupVersion.Version},
|
||||
@ -87,12 +93,6 @@ func init() {
|
||||
internalGroupVersion: extensions.SchemeGroupVersion,
|
||||
}
|
||||
}
|
||||
if _, ok := Groups[extensions.GroupName]; !ok {
|
||||
Groups[extensions.GroupName] = TestGroup{
|
||||
externalGroupVersion: unversioned.GroupVersion{Group: extensions.GroupName, Version: registered.GroupOrDie(extensions.GroupName).GroupVersion.Version},
|
||||
internalGroupVersion: extensions.SchemeGroupVersion,
|
||||
}
|
||||
}
|
||||
|
||||
Default = Groups[api.GroupName]
|
||||
Autoscaling = Groups[autoscaling.GroupName]
|
||||
|
Loading…
Reference in New Issue
Block a user