rkt: Updated the TestMakePodManifestAnnotations().

This commit is contained in:
Yifan Gu 2016-06-13 09:27:28 -07:00
parent f2bf13a5ac
commit 03ee60c810

View File

@ -1754,6 +1754,10 @@ func TestMakePodManifestAnnotations(t *testing.T) {
}, },
out: &appcschema.PodManifest{ out: &appcschema.PodManifest{
Annotations: []appctypes.Annotation{ Annotations: []appctypes.Annotation{
{
Name: "io.kubernetes.container.name",
Value: "POD",
},
{ {
Name: appctypes.ACIdentifier(k8sRktStage1NameAnno), Name: appctypes.ACIdentifier(k8sRktStage1NameAnno),
Value: "stage1-override-img", Value: "stage1-override-img",
@ -1787,11 +1791,11 @@ func TestMakePodManifestAnnotations(t *testing.T) {
hint := fmt.Sprintf("case #%d", i) hint := fmt.Sprintf("case #%d", i)
result, err := r.makePodManifest(testCase.in, "", []api.Secret{}) result, err := r.makePodManifest(testCase.in, "", []api.Secret{})
assert.Equal(t, err, testCase.outerr, hint) assert.Equal(t, testCase.outerr, err, hint)
if err == nil { if err == nil {
sort.Sort(annotationsByName(result.Annotations)) sort.Sort(annotationsByName(result.Annotations))
sort.Sort(annotationsByName(testCase.out.Annotations)) sort.Sort(annotationsByName(testCase.out.Annotations))
assert.Equal(t, result.Annotations, testCase.out.Annotations, hint) assert.Equal(t, testCase.out.Annotations, result.Annotations, hint)
} }
} }
} }