Skip to content

Commit

Permalink
Fix integration
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Oct 11, 2024
1 parent 94910c3 commit 44334a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/metal-api/internal/datastore/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ func (rs *RethinkStore) SetVrfAtSwitches(m *metal.Machine, vrf string) (metal.Sw
}

func (rs *RethinkStore) ConnectMachineWithSwitches(m *metal.Machine) error {
if m.PartitionID == "" {
return fmt.Errorf("partitionID is empty in machine:%s", m.ID)
}
var switches metal.Switches
err := rs.SearchSwitches(&SwitchSearchQuery{PartitionID: &m.PartitionID}, &switches)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ func TestMachineAllocationIntegrationFullCycle(t *testing.T) {

// Register a machine
mrr := &grpcv1.BootServiceRegisterRequest{
Uuid: "test-uuid",
Uuid: "test-uuid",
PartitionId: "test-partition",
Bios: &grpcv1.MachineBIOS{
Version: "a",
Vendor: "metal",
Expand Down

0 comments on commit 44334a3

Please sign in to comment.