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
3 changes: 2 additions & 1 deletion e2e/acceptance/features/topology.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion e2e/acceptance/features/topology_tree.feature
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/e2e/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
31 changes: 31 additions & 0 deletions internal/e2e/values_test.go
Original file line number Diff line number Diff line change
@@ -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"])
}
}
}
Loading