Merge pull request #43157 from msau42/default-sc-test

Automatic merge from submit-queue (batch tested with PRs 43162, 43157)

Use beta default class annotation for default storageclass tests.

**What this PR does / why we need it**:
The default storageclasses are still installed with the beta annotation, so the test should explicitly use the beta annotation.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-03-15 18:24:21 -07:00 committed by GitHub
commit ae828c9c6c

View File

@ -361,12 +361,12 @@ func updateDefaultStorageClass(c clientset.Interface, defaultStr string) {
Expect(err).NotTo(HaveOccurred())
if defaultStr == "" {
delete(sc.Annotations, storageutil.IsDefaultStorageClassAnnotation)
delete(sc.Annotations, storageutil.BetaIsDefaultStorageClassAnnotation)
} else {
if sc.Annotations == nil {
sc.Annotations = make(map[string]string)
}
sc.Annotations[storageutil.IsDefaultStorageClassAnnotation] = defaultStr
sc.Annotations[storageutil.BetaIsDefaultStorageClassAnnotation] = defaultStr
}
sc, err = c.StorageV1().StorageClasses().Update(sc)