Skip to content

Commit

Permalink
fixup! o/devicestate: consider snapd snap when remodeling
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsosanchezbeato committed Oct 19, 2023
1 parent 26754ef commit 760192a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions overlord/managers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8433,27 +8433,26 @@ func (s *mgrsSuiteCore) TestRemodelUC20SnapWithPrereqsMissingDeps(c *C) {
"revision": "1",
})

st := s.o.State()
st.Lock()
defer st.Unlock()

s.prereqSnapAssertions(c, map[string]interface{}{
"snap-name": "prereq",
})

snapPath, _ := s.makeStoreTestSnap(c, prereqSnapYaml, "1")
s.serveSnap(snapPath, "1")
snapdPath, _ := s.makeStoreTestSnap(c, "name: snapd\ntype: snapd\nversion: 123", "1")
s.serveSnap(snapdPath, "2")

st := s.o.State()
st.Lock()
defer st.Unlock()

snapstate.Set(st, "core", nil)
snapstate.Set(st, "snapd", &snapstate.SnapState{
Active: true,
Sequence: []*snap.SideInfo{
{RealName: "snapd", SnapID: fakeSnapID("snapd"), Revision: snap.R(1)},
},
Current: snap.R(1),
SnapType: "snapd",
Current: snap.R(1),
SnapType: "snapd",
TrackingChannel: "latest/stable",
Flags: snapstate.Flags{
Required: true,
},
Expand Down

0 comments on commit 760192a

Please sign in to comment.