mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
remove created-by annotation
This commit is contained in:
@@ -83,21 +83,9 @@ func TestGetJobFromTemplate(t *testing.T) {
|
||||
if len(job.ObjectMeta.Labels) != 1 {
|
||||
t.Errorf("Wrong number of labels")
|
||||
}
|
||||
if len(job.ObjectMeta.Annotations) != 2 {
|
||||
if len(job.ObjectMeta.Annotations) != 1 {
|
||||
t.Errorf("Wrong number of annotations")
|
||||
}
|
||||
v, ok := job.ObjectMeta.Annotations[v1.CreatedByAnnotation]
|
||||
if !ok {
|
||||
t.Errorf("Missing created-by annotation")
|
||||
}
|
||||
expectedCreatedBy := `{"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"CronJob","namespace":"snazzycats","name":"mycronjob","uid":"1a2b3c","apiVersion":"batch"}}
|
||||
`
|
||||
if len(v) != len(expectedCreatedBy) {
|
||||
t.Errorf("Wrong length for created-by annotation, expected %v got %v", len(expectedCreatedBy), len(v))
|
||||
}
|
||||
if v != expectedCreatedBy {
|
||||
t.Errorf("Wrong value for created-by annotation, expected %v got %v", expectedCreatedBy, v)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetParentUIDFromJob(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user