Skip to content

Commit

Permalink
add (missing) deploy.resources.devices.options
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Oct 3, 2024
1 parent 173c5d6 commit 48d3a5b
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 141 deletions.
28 changes: 28 additions & 0 deletions loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3481,3 +3481,31 @@ services:
},
})
}

func TestLoadDeviceReservation(t *testing.T) {
config, err := loadYAML(`
name: load-device-reservation
services:
test:
deploy:
resources:
reservations:
devices:
- driver: richard_feynman
capabilities: ["quantic"]
count: all
options:
q_bits: 42
`)
assert.NilError(t, err)
assert.DeepEqual(t, config.Services["test"].Deploy.Resources.Reservations.Devices, []types.DeviceRequest{
{
Capabilities: []string{"quantic"},
Driver: "richard_feynman",
Count: -1,
Options: types.Mapping{
"q_bits": "42",
},
},
})
}
Loading

0 comments on commit 48d3a5b

Please sign in to comment.