Skip to content

Commit

Permalink
gadget: fix unit test after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
Meulengracht committed Dec 2, 2024
1 parent 382f1dc commit ef807c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions gadget/gadget_emmc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func (s *gadgetYamlEMMCSuite) TestUpdateApplyHappy(c *C) {

rollbackDir := c.MkDir()

restore := gadget.MockVolumeStructureToLocationMap(func(gd gadget.GadgetData, gm gadget.Model, gv map[string]*gadget.Volume) (map[string]map[int]gadget.StructureLocation, map[string]map[int]*gadget.OnDiskStructure, error) {
restore := gadget.MockVolumeStructureToLocationMap(func(_ gadget.Model, _, newVolumes map[string]*gadget.Volume) (map[string]map[int]gadget.StructureLocation, map[string]map[int]*gadget.OnDiskStructure, error) {
return map[string]map[int]gadget.StructureLocation{
"volumename": {
0: {
Expand All @@ -363,8 +363,8 @@ func (s *gadgetYamlEMMCSuite) TestUpdateApplyHappy(c *C) {
},
},
}, map[string]map[int]*gadget.OnDiskStructure{
"volumename": gadget.OnDiskStructsFromGadget(gd.Info.Volumes["volumename"]),
"my-emmc": gadget.OnDiskStructsFromGadget(gd.Info.Volumes["my-emmc"]),
"volumename": gadget.OnDiskStructsFromGadget(newVolumes["volumename"]),
"my-emmc": gadget.OnDiskStructsFromGadget(newVolumes["my-emmc"]),
}, nil
})
defer restore()
Expand Down
5 changes: 0 additions & 5 deletions gadget/install/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ func (s *installSuite) TestVolumeAssignmentDeviceNameMissing(c *C) {
DevNode: "/dev/fakedevice0",
DevPath: "/sys/block/fakedevice0",
},
filepath.Join(s.dir, "/dev/fakedevice1p1"): {
DevNum: "43:0",
DevNode: "/dev/fakedevice1",
DevPath: "/sys/block/fakedevice1",
},
}

restore := disks.MockPartitionDeviceNodeToDiskMapping(m)
Expand Down

0 comments on commit ef807c5

Please sign in to comment.