diff --git a/test/e2e/mnist_pytorch_appwrapper_test.go b/test/e2e/mnist_pytorch_appwrapper_test.go index 1919c616..99c0e1ae 100644 --- a/test/e2e/mnist_pytorch_appwrapper_test.go +++ b/test/e2e/mnist_pytorch_appwrapper_test.go @@ -17,6 +17,8 @@ limitations under the License. package e2e import ( + "encoding/json" + "strings" "testing" . "github.com/onsi/gomega" @@ -145,6 +147,10 @@ func runMnistPyTorchAppWrapper(t *testing.T, accelerator string, numberOfGpus in }, } + raw, _ := json.Marshal(job) + // Workaround to remove creationTimestamp which is brought by json marshaller, this field breaks Kueue reconciliation + patchedRaw := strings.ReplaceAll(string(raw), `"metadata":{"creationTimestamp":null},`, "") + // Create an AppWrapper resource aw := &mcadv1beta2.AppWrapper{ TypeMeta: metav1.TypeMeta{ @@ -159,7 +165,7 @@ func runMnistPyTorchAppWrapper(t *testing.T, accelerator string, numberOfGpus in Spec: mcadv1beta2.AppWrapperSpec{ Components: []mcadv1beta2.AppWrapperComponent{ { - Template: Raw(test, job), + Template: runtime.RawExtension{Raw: []byte(patchedRaw)}, }, }, },