Skip to content

Commit

Permalink
WIP tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
mszadkow committed Jan 2, 2025
1 parent 856c140 commit 4e83f8b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ test: gotestsum ## Run tests.

.PHONY: test-integration
test-integration: gomod-download envtest ginkgo dep-crds kueuectl ginkgo-top ## Run tests.
ls "$(PROJECT_DIR)/dep-crds/ray-operator/crd/bases"
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" \
KUEUE_BIN=$(PROJECT_DIR)/bin \
ENVTEST_K8S_VERSION=$(ENVTEST_K8S_VERSION) \
API_LOG_LEVEL=$(INTEGRATION_API_LOG_LEVEL) \
$(GINKGO) $(INTEGRATION_FILTERS) $(GINKGO_ARGS) -procs=$(INTEGRATION_NPROCS) --race --junit-report=junit.xml --json-report=integration.json --output-dir=$(ARTIFACTS) -v $(INTEGRATION_TARGET)
$(GINKGO) $(INTEGRATION_FILTERS) $(GINKGO_ARGS) -procs=$(INTEGRATION_NPROCS) --output-interceptor-mode=none --race --junit-report=junit.xml --json-report=integration.json --output-dir=$(ARTIFACTS) -v $(INTEGRATION_TARGET)
$(PROJECT_DIR)/bin/ginkgo-top -i $(ARTIFACTS)/integration.json > $(ARTIFACTS)/integration-top.yaml

CREATE_KIND_CLUSTER ?= true
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/jobframework/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ var (
kftraining.SchemeGroupVersion.WithKind(kftraining.PyTorchJobKind).String(),
kftraining.SchemeGroupVersion.WithKind(kftraining.XGBoostJobKind).String(),
kfmpi.SchemeGroupVersion.WithKind(kfmpi.Kind).String(),
rayv1.SchemeGroupVersion.WithKind("RayJob").String())
rayv1.SchemeGroupVersion.WithKind("RayJob").String(),
rayv1.SchemeGroupVersion.WithKind("RayCluster").String())
)

// ValidateJobOnCreate encapsulates all GenericJob validations that must be performed on a Create operation
Expand Down
6 changes: 6 additions & 0 deletions pkg/util/testingjobs/rayjob/wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ func (j *JobWrapper) RayVersion(rv string) *JobWrapper {
return j
}

func (j *JobWrapper) RayStartParams(sp map[string]string) *JobWrapper {
j.Spec.RayClusterSpec.HeadGroupSpec.RayStartParams = sp
j.Spec.RayClusterSpec.WorkerGroupSpecs[0].RayStartParams = sp
return j
}

func (j *JobWrapper) Env(rayType rayv1.RayNodeType, name, value string) *JobWrapper {
if rayType == rayv1.HeadNode {
if j.Spec.RayClusterSpec.HeadGroupSpec.Template.Spec.Containers[0].Env == nil {
Expand Down
1 change: 1 addition & 0 deletions test/integration/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func (f *Framework) Init() *rest.Config {

var err error
cfg, err = f.testEnv.Start()
fmt.Println("KACZKA", err)
gomega.ExpectWithOffset(1, err).NotTo(gomega.HaveOccurred())
gomega.ExpectWithOffset(1, cfg).NotTo(gomega.BeNil())
})
Expand Down

0 comments on commit 4e83f8b

Please sign in to comment.