@@ -29,7 +29,7 @@ func TestInjectPythonSDK(t *testing.T) {
29
29
name string
30
30
v1alpha1.Python
31
31
pod corev1.Pod
32
- wheelKind string
32
+ platform string
33
33
expected corev1.Pod
34
34
err error
35
35
}{
@@ -43,7 +43,7 @@ func TestInjectPythonSDK(t *testing.T) {
43
43
},
44
44
},
45
45
},
46
- wheelKind : "manylinux " ,
46
+ platform : "glibc " ,
47
47
expected : corev1.Pod {
48
48
Spec : corev1.PodSpec {
49
49
Volumes : []corev1.Volume {
@@ -116,7 +116,7 @@ func TestInjectPythonSDK(t *testing.T) {
116
116
},
117
117
},
118
118
},
119
- wheelKind : "manylinux " ,
119
+ platform : "glibc " ,
120
120
expected : corev1.Pod {
121
121
Spec : corev1.PodSpec {
122
122
Volumes : []corev1.Volume {
@@ -190,7 +190,7 @@ func TestInjectPythonSDK(t *testing.T) {
190
190
},
191
191
},
192
192
},
193
- wheelKind : "manylinux " ,
193
+ platform : "glibc " ,
194
194
expected : corev1.Pod {
195
195
Spec : corev1.PodSpec {
196
196
Volumes : []corev1.Volume {
@@ -263,7 +263,7 @@ func TestInjectPythonSDK(t *testing.T) {
263
263
},
264
264
},
265
265
},
266
- wheelKind : "manylinux " ,
266
+ platform : "glibc " ,
267
267
expected : corev1.Pod {
268
268
Spec : corev1.PodSpec {
269
269
Volumes : []corev1.Volume {
@@ -336,7 +336,7 @@ func TestInjectPythonSDK(t *testing.T) {
336
336
},
337
337
},
338
338
},
339
- wheelKind : "manylinux " ,
339
+ platform : "glibc " ,
340
340
expected : corev1.Pod {
341
341
Spec : corev1.PodSpec {
342
342
Volumes : []corev1.Volume {
@@ -409,7 +409,7 @@ func TestInjectPythonSDK(t *testing.T) {
409
409
},
410
410
},
411
411
},
412
- wheelKind : "manylinux " ,
412
+ platform : "glibc " ,
413
413
expected : corev1.Pod {
414
414
Spec : corev1.PodSpec {
415
415
Containers : []corev1.Container {
@@ -427,7 +427,7 @@ func TestInjectPythonSDK(t *testing.T) {
427
427
err : fmt .Errorf ("the container defines env var value via ValueFrom, envVar: %s" , envPythonPath ),
428
428
},
429
429
{
430
- name : "musllinux wheelKind defined" ,
430
+ name : "musl platform defined" ,
431
431
Python : v1alpha1.Python {Image : "foo/bar:1" },
432
432
pod : corev1.Pod {
433
433
Spec : corev1.PodSpec {
@@ -436,7 +436,7 @@ func TestInjectPythonSDK(t *testing.T) {
436
436
},
437
437
},
438
438
},
439
- wheelKind : "musllinux " ,
439
+ platform : "musl " ,
440
440
expected : corev1.Pod {
441
441
Spec : corev1.PodSpec {
442
442
Volumes : []corev1.Volume {
@@ -493,7 +493,7 @@ func TestInjectPythonSDK(t *testing.T) {
493
493
err : nil ,
494
494
},
495
495
{
496
- name : "wheelKind not defined" ,
496
+ name : "platform not defined" ,
497
497
Python : v1alpha1.Python {Image : "foo/bar:1" },
498
498
pod : corev1.Pod {
499
499
Spec : corev1.PodSpec {
@@ -502,7 +502,7 @@ func TestInjectPythonSDK(t *testing.T) {
502
502
},
503
503
},
504
504
},
505
- wheelKind : "" ,
505
+ platform : "" ,
506
506
expected : corev1.Pod {
507
507
Spec : corev1.PodSpec {
508
508
Volumes : []corev1.Volume {
@@ -559,7 +559,7 @@ func TestInjectPythonSDK(t *testing.T) {
559
559
err : nil ,
560
560
},
561
561
{
562
- name : "wheelKind not supported" ,
562
+ name : "platform not supported" ,
563
563
Python : v1alpha1.Python {Image : "foo/bar:1" },
564
564
pod : corev1.Pod {
565
565
Spec : corev1.PodSpec {
@@ -568,21 +568,21 @@ func TestInjectPythonSDK(t *testing.T) {
568
568
},
569
569
},
570
570
},
571
- wheelKind : "not supported" ,
571
+ platform : "not- supported" ,
572
572
expected : corev1.Pod {
573
573
Spec : corev1.PodSpec {
574
574
Containers : []corev1.Container {
575
575
{},
576
576
},
577
577
},
578
578
},
579
- err : fmt .Errorf ("provided instrumentation.opentelemetry.io/otel-python-wheel-kind annotation value 'not supported' is not supported" ),
579
+ err : fmt .Errorf ("provided instrumentation.opentelemetry.io/otel-python-platform annotation value 'not- supported' is not supported" ),
580
580
},
581
581
}
582
582
583
583
for _ , test := range tests {
584
584
t .Run (test .name , func (t * testing.T ) {
585
- pod , err := injectPythonSDK (test .Python , test .pod , 0 , test .wheelKind )
585
+ pod , err := injectPythonSDK (test .Python , test .pod , 0 , test .platform )
586
586
assert .Equal (t , test .expected , pod )
587
587
assert .Equal (t , test .err , err )
588
588
})
0 commit comments