diff --git a/e2e/acceptance/features/topology.feature b/e2e/acceptance/features/topology.feature index 5fb2e9c01..3c951e872 100644 --- a/e2e/acceptance/features/topology.feature +++ b/e2e/acceptance/features/topology.feature @@ -13,7 +13,8 @@ Feature: Slurm named topologies When Slurm is asked which topologies it loaded Then Slurm loaded exactly the topologies the operator rendered - @multi_topology @soperator_version_>=5.0.0 + # Remove @unstable after worker topology registration is fixed. + @multi_topology @unstable @soperator_version_>=5.0.0 Scenario: Partitions and workers use their configured topologies Given the operator published the topology config When Slurm is asked which topologies it loaded diff --git a/e2e/acceptance/features/topology_tree.feature b/e2e/acceptance/features/topology_tree.feature index e9cc1eb33..6792aa205 100644 --- a/e2e/acceptance/features/topology_tree.feature +++ b/e2e/acceptance/features/topology_tree.feature @@ -1,6 +1,7 @@ Feature: Slurm tree-topology scheduling - @gpu @tree_topology @soperator_version_>=5.0.0 + # Remove @unstable after worker topology registration is fixed. + @gpu @tree_topology @unstable @soperator_version_>=5.0.0 Scenario: A switch limit rejects a cross-leaf allocation Given the cluster is configured with a tree topology spanning multiple leaf switches And the operator published the topology config diff --git a/internal/e2e/values.go b/internal/e2e/values.go index a6a6bb8dc..cb3ce5b16 100644 --- a/internal/e2e/values.go +++ b/internal/e2e/values.go @@ -99,7 +99,7 @@ func overrideTestValues(tfVars map[string]interface{}, cfg Config) map[string]in "gpu_cluster": gpuClusterValue(ns.InfinibandFabric), "preemptible": preemptibleValue(ns.Preemptible), "features": nil, - "create_partition": nil, + "create_partition": true, "node_local_jail_submounts": []map[string]interface{}{ { "name": "local-data", diff --git a/internal/e2e/values_test.go b/internal/e2e/values_test.go new file mode 100644 index 000000000..c242aa2e3 --- /dev/null +++ b/internal/e2e/values_test.go @@ -0,0 +1,31 @@ +package e2e + +import "testing" + +func TestOverrideTestValuesCreatesWorkerPartitions(t *testing.T) { + tfVars := map[string]interface{}{} + cfg := Config{ + Profile: Profile{ + NodeSets: []NodeSetDef{ + {Name: "cpu", Platform: "cpu-d3", Preset: "16vcpu-64gb", Size: 1}, + {Name: "gpu", Platform: "gpu-h100-sxm", Preset: "8gpu-128vcpu-1600gb", Size: 2}, + }, + }, + } + + got := overrideTestValues(tfVars, cfg) + workers, ok := got["slurm_nodeset_workers"].([]interface{}) + if !ok { + t.Fatalf("slurm_nodeset_workers has type %T, want []interface{}", got["slurm_nodeset_workers"]) + } + + for i, worker := range workers { + values, ok := worker.(map[string]interface{}) + if !ok { + t.Fatalf("slurm_nodeset_workers[%d] has type %T, want map[string]interface{}", i, worker) + } + if create, ok := values["create_partition"].(bool); !ok || !create { + t.Errorf("slurm_nodeset_workers[%d].create_partition = %#v, want true", i, values["create_partition"]) + } + } +}