feat(task): auto-inject scheduling params into script template via scheduling_map
Add scheduling_map field to ParameterSchema so Application creators can declare that a parameter (e.g. NP) maps to a scheduling field (e.g. cpus). The backend auto-injects the scheduling value into script template variables before rendering, eliminating duplicate user input. The frontend hides mapped parameters from the form and injects their values on submit.
This commit is contained in:
@@ -444,6 +444,26 @@ func TestClusterService_GetPartition_ErrorLogging(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDerefInt64ToStr(t *testing.T) {
|
||||
t.Run("nil returns empty", func(t *testing.T) {
|
||||
if got := derefInt64ToStr(nil); got != "" {
|
||||
t.Errorf("derefInt64ToStr(nil) = %q, want empty", got)
|
||||
}
|
||||
})
|
||||
t.Run("non-nil returns string", func(t *testing.T) {
|
||||
v := int64(4096)
|
||||
if got := derefInt64ToStr(&v); got != "4096" {
|
||||
t.Errorf("derefInt64ToStr(4096) = %q, want %q", got, "4096")
|
||||
}
|
||||
})
|
||||
t.Run("zero value", func(t *testing.T) {
|
||||
v := int64(0)
|
||||
if got := derefInt64ToStr(&v); got != "0" {
|
||||
t.Errorf("derefInt64ToStr(0) = %q, want %q", got, "0")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestClusterService_GetDiag_ErrorLogging(t *testing.T) {
|
||||
srv := errorServer()
|
||||
defer srv.Close()
|
||||
|
||||
Reference in New Issue
Block a user