func (s *FirstBootTestSuite) TestTwoRuns(c *C) { c.Assert(boot.FirstBoot(), IsNil) _, err := os.Stat(dirs.SnapFirstBootStamp) c.Assert(err, IsNil) c.Assert(boot.FirstBoot(), Equals, boot.ErrNotFirstBoot) }
func (x *cmdInternalFirstBoot) Execute(args []string) error { if len(args) > 0 { return ErrExtraArgs } return boot.FirstBoot() }
func (s *FirstBootTestSuite) TestFirstBootnableEther(c *C) { release.MockOnClassic(false) firstBootEnableFirstEtherRun := false restore := boot.MockFirstbootInitialNetworkConfig(func() error { firstBootEnableFirstEtherRun = true return nil }) defer restore() c.Assert(boot.FirstBoot(), IsNil) c.Assert(firstBootEnableFirstEtherRun, Equals, true) }
func (s *FirstBootTestSuite) TestNoErrorWhenNoGadget(c *C) { c.Assert(boot.FirstBoot(), IsNil) _, err := os.Stat(dirs.SnapFirstBootStamp) c.Assert(err, IsNil) }