kubernetes/pkg
Kubernetes Submit Queue 1bcb381169 Merge pull request #49355 from dhilipkumars/UTDeployment
Automatic merge from submit-queue

deployment: SetNewReplicaSetAnnotations() should compare revisions as numbers than strings

**What this PR does / why we need it**: 
1) SetNewReplicaSetAnnotations() when deployment revision annotation is copied over to RS, it performs a string comparison instead of int comparison, due to this any revision beyond 9 might not get copied.
2) Slightly improves the coverage by adding UT for Annotation related functions
3) Upgrade the test suite to use go-langs sub-test, which is very useful while investigating UT related failures.

```
--- FAIL: TestAnnotationUtils (0.00s)
    --- FAIL: TestAnnotationUtils/SetNewReplicaSetAnnotations (0.00s)
        deployment_util_test.go:1283: Revision Expected=10 Obtained=9
        deployment_util_test.go:1283: Revision Expected=11 Obtained=9
        deployment_util_test.go:1283: Revision Expected=12 Obtained=9
        deployment_util_test.go:1283: Revision Expected=13 Obtained=9
        deployment_util_test.go:1283: Revision Expected=14 Obtained=9
        deployment_util_test.go:1283: Revision Expected=15 Obtained=9
        deployment_util_test.go:1283: Revision Expected=16 Obtained=9
        deployment_util_test.go:1283: Revision Expected=17 Obtained=9
        deployment_util_test.go:1283: Revision Expected=18 Obtained=9
        deployment_util_test.go:1283: Revision Expected=19 Obtained=9
        deployment_util_test.go:1283: Revision Expected=20 Obtained=9
    --- PASS: TestAnnotationUtils/SetReplicasAnnotations (0.00s)
    --- PASS: TestAnnotationUtils/IsSaturated (0.00s)
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**: None

```release-note
```
cc: @kargakis
2017-07-22 10:56:55 -07:00
..
api Merge pull request #46514 from ravisantoshgudimetla/scheduler_taints_refactor 2017-07-21 22:23:24 -07:00
apimachinery/tests Move pkg/apimachinery/test to apimachinery 2017-07-08 08:48:38 +08:00
apis Merge pull request #49240 from caesarxuchao/remove-admission-types 2017-07-21 17:00:23 -07:00
auth Only do string trim when it's necessary 2017-06-15 17:32:31 +08:00
bootstrap/api run hack/update-all 2017-06-22 11:31:03 -07:00
capabilities Fix comment for method SetForTests 2017-02-14 17:16:49 +08:00
client remove external clientset, listers, informers from kubernetes 2017-07-21 13:35:23 -07:00
cloudprovider Merge pull request #49299 from dims/delay-looking-for-instance-id 2017-07-21 22:23:19 -07:00
controller Merge pull request #49355 from dhilipkumars/UTDeployment 2017-07-22 10:56:55 -07:00
conversion Revert "Remove conversion package" 2017-01-22 15:41:06 -08:00
credentialprovider azure: acr: support auth to preview ACR w/ MSI+AAD 2017-07-18 15:22:34 -07:00
features Update factory.go informers to update equivalence cache 2017-07-18 23:55:01 +08:00
fieldpath Add Pod UID (metadata.uid) to downward API env var 2017-06-27 16:54:35 +08:00
fields move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
generated Merge pull request #48746 from janetkuo/apps-v1beta2 2017-07-21 11:47:21 -07:00
hyperkube Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
kubeapiserver *: remove --insecure-allow-any-token option 2017-07-18 16:03:15 -07:00
kubectl Merge pull request #49326 from deads2k/cli-16-all 2017-07-21 23:18:58 -07:00
kubelet Merge pull request #49234 from mengqiy/master 2017-07-20 15:08:22 -07:00
kubemark update godep 2017-07-20 11:03:49 -07:00
labels add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
master Don't enable apps/v1beta2 by default 2017-07-20 10:25:21 -07:00
printers Merge pull request #46210 from xiangpengzhao/print-volume-info 2017-07-21 16:45:37 -07:00
probe update godep 2017-07-20 11:03:49 -07:00
proxy update godep 2017-07-20 11:03:49 -07:00
quota use informers for quota evaluation of core resources where possible 2017-07-19 15:52:39 -04:00
registry Merge pull request #48418 from xiangpengzhao/refactor-create-svc 2017-07-22 02:05:21 -07:00
routes Merge pull request #45490 from deads2k/owners-01-extensions 2017-05-10 12:51:51 -07:00
runtime add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
security Refactor: pkg/util into sub-pkgs 2017-07-18 14:34:08 +08:00
securitycontext run hack/update-all 2017-06-22 11:31:03 -07:00
serviceaccount Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
ssh autogenerated 2017-04-14 10:40:57 -07:00
types add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
util Merge pull request #46514 from ravisantoshgudimetla/scheduler_taints_refactor 2017-07-21 22:23:24 -07:00
version Convert go_binary linkstamp to x_defs 2017-06-08 14:59:55 -07:00
volume Fix controller crash because of nil volume spec 2017-07-21 18:42:11 -04:00
watch autogenerated 2017-04-14 10:40:57 -07:00
BUILD generated innocuous change 2017-07-21 14:29:59 -07:00
OWNERS Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00