Skip to content

Commit

Permalink
Renames "Wrapped" to "Raw" for containerizer Machine shim, and regren…
Browse files Browse the repository at this point in the history
…erates mocks.
  • Loading branch information
manadart committed Oct 11, 2018
1 parent 863d34e commit 17a6ee0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions apiserver/facades/agent/provisioner/machine_mock_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion network/containerizer/bridgepolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ func (s *bridgePolicyStateSuite) TestPopulateContainerLinkLayerDevicesUnitBindin
addCharm(c, s.State, "quantal", "mysql"), map[string]string{"server": "default"})
unit, err := app.AddUnit(state.AddUnitParams{})
c.Assert(err, jc.ErrorIsNil)
err = unit.AssignToMachine(s.containerMachine.Wrapped())
err = unit.AssignToMachine(s.containerMachine.Raw())
c.Assert(err, jc.ErrorIsNil)
spaces, err := s.containerMachine.DesiredSpaces()
c.Assert(err, jc.ErrorIsNil)
Expand Down
8 changes: 4 additions & 4 deletions network/containerizer/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type Machine interface {
AllSpaces() (set.Strings, error)
LinkLayerDevicesForSpaces([]string) (map[string][]LinkLayerDevice, error)
SetLinkLayerDevices(devicesArgs ...state.LinkLayerDeviceArgs) (err error)
AllLinkLayerDevices() ([]LinkLayerDevice, error)

// TODO (manadart 2018-10-10) These methods are used in tests, which rely
// on the StateSuite. Some of them are recruited via the Container
Expand All @@ -64,10 +65,9 @@ type Machine interface {
// presence here.
SetDevicesAddresses(devicesAddresses ...state.LinkLayerDeviceAddress) (err error)
SetParentLinkLayerDevicesBeforeTheirChildren(devicesArgs []state.LinkLayerDeviceArgs) error
AllLinkLayerDevices() ([]LinkLayerDevice, error)
SetConstraints(cons constraints.Value) (err error)
RemoveAllAddresses() error
Wrapped() *state.Machine
Raw() *state.Machine
}

// MachineShim implements Machine.
Expand Down Expand Up @@ -113,8 +113,8 @@ func (m *MachineShim) AllLinkLayerDevices() ([]LinkLayerDevice, error) {
return wrapped, nil
}

// Wrapped returns the inner state.Machine reference.
func (m *MachineShim) Wrapped() *state.Machine {
// Raw returns the inner state.Machine reference.
func (m *MachineShim) Raw() *state.Machine {
return m.Machine
}

Expand Down

0 comments on commit 17a6ee0

Please sign in to comment.