diff --git a/daemon/api_systems_test.go b/daemon/api_systems_test.go index 401f2d5855e..5c7458de6cc 100644 --- a/daemon/api_systems_test.go +++ b/daemon/api_systems_test.go @@ -978,6 +978,7 @@ func (s *systemsSuite) TestSystemsGetSpecificLabelIntegration(c *check.C) { Image: "pc-boot.img", }, }, + YamlIndex: 0, }, { Name: "BIOS Boot", @@ -994,6 +995,7 @@ func (s *systemsSuite) TestSystemsGetSpecificLabelIntegration(c *check.C) { Image: "pc-core.img", }, }, + YamlIndex: 1, }, { Name: "ubuntu-seed", @@ -1014,6 +1016,7 @@ func (s *systemsSuite) TestSystemsGetSpecificLabelIntegration(c *check.C) { Target: "EFI/boot/bootx64.efi", }, }, + YamlIndex: 2, }, { Name: "ubuntu-boot", @@ -1024,6 +1027,7 @@ func (s *systemsSuite) TestSystemsGetSpecificLabelIntegration(c *check.C) { Offset: asOffsetPtr(1202 * quantity.OffsetMiB), Size: 750 * quantity.SizeMiB, Filesystem: "ext4", + YamlIndex: 3, }, { Name: "ubuntu-save", @@ -1034,6 +1038,7 @@ func (s *systemsSuite) TestSystemsGetSpecificLabelIntegration(c *check.C) { Offset: asOffsetPtr(1952 * quantity.OffsetMiB), Size: 16 * quantity.SizeMiB, Filesystem: "ext4", + YamlIndex: 4, }, { Name: "ubuntu-data", @@ -1044,6 +1049,7 @@ func (s *systemsSuite) TestSystemsGetSpecificLabelIntegration(c *check.C) { Offset: asOffsetPtr(1968 * quantity.OffsetMiB), Size: 1 * quantity.SizeGiB, Filesystem: "ext4", + YamlIndex: 5, }, }, }, diff --git a/gadget/export_test.go b/gadget/export_test.go index d85ce5f353f..c4995405b02 100644 --- a/gadget/export_test.go +++ b/gadget/export_test.go @@ -65,6 +65,7 @@ var ( OnDiskStructureIsLikelyImplicitSystemDataRole = onDiskStructureIsLikelyImplicitSystemDataRole SearchForVolumeWithTraits = searchForVolumeWithTraits + OrderStructuresByOffset = orderStructuresByOffset ) func MockEvalSymlinks(mock func(path string) (string, error)) (restore func()) { diff --git a/gadget/gadget.go b/gadget/gadget.go index 27fba833123..efb5eecb719 100644 --- a/gadget/gadget.go +++ b/gadget/gadget.go @@ -192,6 +192,9 @@ type VolumeStructure struct { // and just used as part of the POST /systems/