Skip to content

Commit 7437b9b

Browse files
committed
AppWrapper e2e: Remove creationTimestamp from marshalled template
1 parent 97a2239 commit 7437b9b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/e2e/mnist_pytorch_appwrapper_test.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package e2e
1818

1919
import (
20+
"encoding/json"
21+
"strings"
2022
"testing"
2123

2224
. "github.com/onsi/gomega"
@@ -145,6 +147,10 @@ func runMnistPyTorchAppWrapper(t *testing.T, accelerator string, numberOfGpus in
145147
},
146148
}
147149

150+
raw, _ := json.Marshal(job)
151+
// Workaround to remove creationTimestamp which is brought by json marshaller, this field breaks Kueue reconciliation
152+
patchedRaw := strings.ReplaceAll(string(raw), `"metadata":{"creationTimestamp":null},`, "")
153+
148154
// Create an AppWrapper resource
149155
aw := &mcadv1beta2.AppWrapper{
150156
TypeMeta: metav1.TypeMeta{
@@ -159,7 +165,7 @@ func runMnistPyTorchAppWrapper(t *testing.T, accelerator string, numberOfGpus in
159165
Spec: mcadv1beta2.AppWrapperSpec{
160166
Components: []mcadv1beta2.AppWrapperComponent{
161167
{
162-
Template: Raw(test, job),
168+
Template: runtime.RawExtension{Raw: []byte(patchedRaw)},
163169
},
164170
},
165171
},

0 commit comments

Comments
 (0)