Skip to content

Commit ae12c4a

Browse files
committed
adjust defaulting and filtering
1 parent 564d684 commit ae12c4a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/e2e/deployment_appwrapper_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2929
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
3030
"k8s.io/apimachinery/pkg/runtime"
31+
"k8s.io/apimachinery/pkg/util/intstr"
3132
"k8s.io/utils/ptr"
3233
"sigs.k8s.io/kueue/apis/kueue/v1beta1"
3334
)
@@ -114,7 +115,7 @@ func runDeploymentAppWrapper(t *testing.T) {
114115
Spec: corev1.ServiceSpec{
115116
Type: corev1.ServiceTypeClusterIP,
116117
Selector: map[string]string{"app": "inference"},
117-
Ports: []corev1.ServicePort{{Port: 8080, Protocol: corev1.ProtocolTCP}},
118+
Ports: []corev1.ServicePort{{Port: 8080, Protocol: corev1.ProtocolTCP, TargetPort: intstr.FromInt(8080)}},
118119
},
119120
}
120121

test/e2e/support.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ func ReadFile(t support.Test, fileName string) []byte {
3939
func RemoveCreationTimestamp(t support.Test, rawExtension runtime.RawExtension) runtime.RawExtension {
4040
t.T().Helper()
4141
patchedRaw := strings.ReplaceAll(string(rawExtension.Raw), `"metadata":{"creationTimestamp":null},`, "")
42+
patchedRaw = strings.ReplaceAll(patchedRaw, `"metadata":{"creationTimestamp":null,`, `"metadata":{`)
43+
patchedRaw = strings.ReplaceAll(patchedRaw, `"creationTimestamp":null,`, "")
44+
t.T().Logf("Patched raw: %v", patchedRaw)
4245
return runtime.RawExtension{
4346
Raw: []byte(patchedRaw),
4447
}

0 commit comments

Comments
 (0)