Skip to content

Commit

Permalink
Fix wrong systemctl mocking.
Browse files Browse the repository at this point in the history
  • Loading branch information
stolowski committed Feb 23, 2022
1 parent 14fbedc commit 08141cf
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions wrappers/core18_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,6 @@ func (s *servicesTestSuite) TestAddSnapServicesForSnapdOnCorePreseeding(c *C) {
// reset root dir
dirs.SetRootDir(s.tempdir)

systemctlRestorer := systemd.MockSystemctl(func(cmd ...string) ([]byte, error) {
return nil, fmt.Errorf("not expected")
})
defer systemctlRestorer()

info := makeMockSnapdSnap(c)
// add the snapd service
err := wrappers.AddSnapdSnapServices(info, &wrappers.AddSnapdSnapServicesOptions{Preseeding: true}, progress.Null)
Expand Down Expand Up @@ -308,7 +303,6 @@ WantedBy=snapd.service
{"--root", s.tempdir, "enable", "snapd.autoimport.service"},
{"--root", s.tempdir, "enable", "snapd.service"},
{"--root", s.tempdir, "enable", "snapd.snap-repair.timer"},
// test pretends snapd.socket is disabled and needs enabling
{"--root", s.tempdir, "enable", "snapd.socket"},
{"--root", s.tempdir, "enable", "snapd.system-shutdown.service"},
{"--user", "--global", "disable", "snapd.session-agent.service"},
Expand Down

0 comments on commit 08141cf

Please sign in to comment.