Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/e2e/mnist_pytorch_appwrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ func runMnistPyTorchAppWrapper(t *testing.T, accelerator string, numberOfGpus in
},
}

raw := Raw(test, job)
raw = RemoveCreationTimestamp(test, raw)

// Create an AppWrapper resource
aw := &mcadv1beta2.AppWrapper{
TypeMeta: metav1.TypeMeta{
Expand All @@ -159,7 +162,7 @@ func runMnistPyTorchAppWrapper(t *testing.T, accelerator string, numberOfGpus in
Spec: mcadv1beta2.AppWrapperSpec{
Components: []mcadv1beta2.AppWrapperComponent{
{
Template: Raw(test, job),
Template: raw,
},
},
},
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/mnist_rayjob_raycluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ func runMnistRayJobRayClusterAppWrapper(t *testing.T, accelerator string, number

// Create RayCluster, wrap in AppWrapper and assign to localqueue
rayCluster := constructRayCluster(test, namespace, mnist, numberOfGpus)
raw := Raw(test, rayCluster)
raw = RemoveCreationTimestamp(test, raw)

aw := &mcadv1beta2.AppWrapper{
TypeMeta: metav1.TypeMeta{
APIVersion: mcadv1beta2.GroupVersion.String(),
Expand All @@ -148,7 +151,7 @@ func runMnistRayJobRayClusterAppWrapper(t *testing.T, accelerator string, number
Spec: mcadv1beta2.AppWrapperSpec{
Components: []mcadv1beta2.AppWrapperComponent{
{
Template: Raw(test, rayCluster),
Template: raw,
},
},
},
Expand Down
11 changes: 11 additions & 0 deletions test/e2e/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ package e2e

import (
"embed"
"strings"

"github.com/onsi/gomega"
"github.com/project-codeflare/codeflare-common/support"

"k8s.io/apimachinery/pkg/runtime"
)

//go:embed *.py *.txt *.sh
Expand All @@ -32,3 +35,11 @@ func ReadFile(t support.Test, fileName string) []byte {
t.Expect(err).NotTo(gomega.HaveOccurred())
return file
}

func RemoveCreationTimestamp(t support.Test, rawExtension runtime.RawExtension) runtime.RawExtension {
t.T().Helper()
patchedRaw := strings.ReplaceAll(string(rawExtension.Raw), `"metadata":{"creationTimestamp":null},`, "")
return runtime.RawExtension{
Raw: []byte(patchedRaw),
}
}