@@ -23,12 +23,12 @@ func TestGetWorkloadInfo(t *testing.T) {
2323 {
2424 name : "deployment" ,
2525 pod : podInfo {
26- name : "opensuse -deployment-674bcc58f4-pwvps" ,
26+ name : "ubuntu -deployment-674bcc58f4-pwvps" ,
2727 labels : map [string ]string {
2828 podTemplateHashLabel : "674bcc58f4" ,
2929 },
3030 },
31- wantName : "opensuse -deployment" ,
31+ wantName : "ubuntu -deployment" ,
3232 wantType : workloadkind .Deployment ,
3333 },
3434 {
@@ -79,26 +79,26 @@ func TestGetWorkloadInfo(t *testing.T) {
7979 {
8080 name : "statefulset" ,
8181 pod : podInfo {
82- name : "opensuse -statefulset-0" ,
82+ name : "ubuntu -statefulset-0" ,
8383 labels : map [string ]string {
8484 "apps.kubernetes.io/pod-index" : "0" ,
85- "controller-revision-hash" : "opensuse -statefulset-7b5845dd9c" ,
86- statefulsetLabel : "opensuse -statefulset-0" ,
85+ "controller-revision-hash" : "ubuntu -statefulset-7b5845dd9c" ,
86+ statefulsetLabel : "ubuntu -statefulset-0" ,
8787 },
8888 },
89- wantName : "opensuse -statefulset" ,
89+ wantName : "ubuntu -statefulset" ,
9090 wantType : workloadkind .StatefulSet ,
9191 },
9292 {
9393 name : "daemonset" ,
9494 pod : podInfo {
95- name : "opensuse -daemonset-6qq8v" ,
95+ name : "ubuntu -daemonset-6qq8v" ,
9696 labels : map [string ]string {
9797 daemonsetLabel : "568bcd7685" ,
9898 "pod-template-generation" : "1" ,
9999 },
100100 },
101- wantName : "opensuse -daemonset" ,
101+ wantName : "ubuntu -daemonset" ,
102102 wantType : workloadkind .DaemonSet ,
103103 },
104104 {
@@ -128,73 +128,73 @@ func TestGetWorkloadInfo(t *testing.T) {
128128 {
129129 name : "cronjob both label" ,
130130 pod : podInfo {
131- name : "opensuse -cronjob-29483273-vthf9" ,
131+ name : "ubuntu -cronjob-29483273-vthf9" ,
132132 labels : map [string ]string {
133133 "batch.kubernetes.io/controller-uid" : "0bebfe37-e018-4ff3-86fa-74cdd8dc2c67" ,
134- newJobNameLabel : "opensuse -cronjob-29483273" ,
134+ newJobNameLabel : "ubuntu -cronjob-29483273" ,
135135 "controller-uid" : "0bebfe37-e018-4ff3-86fa-74cdd8dc2c67" ,
136- oldJobNameLabel : "opensuse -cronjob-29483273" ,
136+ oldJobNameLabel : "ubuntu -cronjob-29483273" ,
137137 },
138138 },
139- wantName : "opensuse -cronjob" ,
139+ wantName : "ubuntu -cronjob" ,
140140 wantType : workloadkind .CronJob ,
141141 },
142142 {
143143 name : "cronjob new label only" ,
144144 pod : podInfo {
145- name : "opensuse -cronjob-29483273-vthf9" ,
145+ name : "ubuntu -cronjob-29483273-vthf9" ,
146146 labels : map [string ]string {
147147 "batch.kubernetes.io/controller-uid" : "0bebfe37-e018-4ff3-86fa-74cdd8dc2c67" ,
148148 "controller-uid" : "0bebfe37-e018-4ff3-86fa-74cdd8dc2c67" ,
149- newJobNameLabel : "opensuse -cronjob-29483273" ,
149+ newJobNameLabel : "ubuntu -cronjob-29483273" ,
150150 },
151151 },
152- wantName : "opensuse -cronjob" ,
152+ wantName : "ubuntu -cronjob" ,
153153 wantType : workloadkind .CronJob ,
154154 },
155155 {
156156 name : "cronjob old label only" ,
157157 pod : podInfo {
158- name : "opensuse -cronjob-29483273-vthf9" ,
158+ name : "ubuntu -cronjob-29483273-vthf9" ,
159159 labels : map [string ]string {
160160 "batch.kubernetes.io/controller-uid" : "0bebfe37-e018-4ff3-86fa-74cdd8dc2c67" ,
161161 "controller-uid" : "0bebfe37-e018-4ff3-86fa-74cdd8dc2c67" ,
162- oldJobNameLabel : "opensuse -cronjob-29483273" ,
162+ oldJobNameLabel : "ubuntu -cronjob-29483273" ,
163163 },
164164 },
165- wantName : "opensuse -cronjob" ,
165+ wantName : "ubuntu -cronjob" ,
166166 wantType : workloadkind .CronJob ,
167167 },
168168 {
169169 name : "job" ,
170170 pod : podInfo {
171- name : "opensuse -job-9bq97" ,
171+ name : "ubuntu -job-9bq97" ,
172172 labels : map [string ]string {
173173 "batch.kubernetes.io/controller-uid" : "bdd392e0-262c-4fdf-8825-6e7d7351fec9" ,
174- newJobNameLabel : "opensuse -job" ,
174+ newJobNameLabel : "ubuntu -job" ,
175175 "controller-uid" : "bdd392e0-262c-4fdf-8825-6e7d7351fec9" ,
176- oldJobNameLabel : "opensuse -job" ,
176+ oldJobNameLabel : "ubuntu -job" ,
177177 },
178178 },
179- wantName : "opensuse -job" ,
179+ wantName : "ubuntu -job" ,
180180 wantType : workloadkind .Job ,
181181 },
182182 {
183183 name : "simple pod" ,
184184 pod : podInfo {
185- name : "opensuse -pod" ,
185+ name : "ubuntu -pod" ,
186186 labels : map [string ]string {},
187187 },
188- wantName : "opensuse -pod" ,
188+ wantName : "ubuntu -pod" ,
189189 wantType : workloadkind .Pod ,
190190 },
191191 {
192192 name : "replicaset ignored" ,
193193 pod : podInfo {
194- name : "opensuse -replicaset-rnswg" ,
194+ name : "ubuntu -replicaset-rnswg" ,
195195 labels : map [string ]string {},
196196 },
197- wantName : "opensuse -replicaset-rnswg" ,
197+ wantName : "ubuntu -replicaset-rnswg" ,
198198 wantType : workloadkind .Pod ,
199199 },
200200 }
0 commit comments