Skip to content

Commit

Permalink
Review feedback group 1
Browse files Browse the repository at this point in the history
  • Loading branch information
flotter committed Aug 26, 2024
1 parent 7ea1d61 commit f5eff8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions internals/overlord/planstate/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ func NewManager(layersDir string) (*PlanManager, error) {
return manager, nil
}

// RegisterExtension adds a plan extension which extends the plan schema. All
// extensions must be registered before Load() is called.
func (m *PlanManager) RegisterExtension(field string, ext plan.LayerSectionExtension) {
plan.RegisterExtension(field, ext)
}

// Load reads plan layers from the pebble directory, combines and validates the
// final plan, and finally notifies registered managers of the plan update. In
// the case of a non-existent layers directory, or no layers in the layers
Expand Down
6 changes: 3 additions & 3 deletions internals/overlord/planstate/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (ps *planSuite) TestExtLoadLayers(c *C) {
var err error
ps.planMgr, err = planstate.NewManager(ps.layersDir)
c.Assert(err, IsNil)
ps.planMgr.RegisterExtension(testField, testExtension{})
plan.RegisterExtension(testField, testExtension{})
// Write layers
for _, l := range extLoadLayers {
ps.writeLayer(c, string(reindent(l)))
Expand Down Expand Up @@ -227,7 +227,7 @@ func (ps *planSuite) TestExtAppendLayers(c *C) {
var err error
ps.planMgr, err = planstate.NewManager(ps.layersDir)
c.Assert(err, IsNil)
ps.planMgr.RegisterExtension(testField, testExtension{})
plan.RegisterExtension(testField, testExtension{})

// Append a layer when there are no layers.
layer := ps.parseLayer(c, 0, "label1", `
Expand Down Expand Up @@ -465,7 +465,7 @@ func (ps *planSuite) TestExtCombineLayers(c *C) {
var err error
ps.planMgr, err = planstate.NewManager(ps.layersDir)
c.Assert(err, IsNil)
ps.planMgr.RegisterExtension(testField, testExtension{})
plan.RegisterExtension(testField, testExtension{})

// "Combine" layer with no layers should just append.
layer := ps.parseLayer(c, 0, "label1", `
Expand Down

0 comments on commit f5eff8e

Please sign in to comment.