mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-13 21:20:47 +00:00
Fix getting lvm recovery (#70)
This commit is contained in:
@@ -16,10 +16,8 @@ limitations under the License.
|
||||
package action_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/kairos-io/kairos/v2/pkg/constants"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
@@ -28,76 +26,3 @@ func TestActionSuite(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Actions test suite")
|
||||
}
|
||||
|
||||
func lsblkMockOutput() []byte {
|
||||
return []byte(fmt.Sprintf(
|
||||
`{
|
||||
"blockdevices": [
|
||||
{
|
||||
"name": "mmcblk0",
|
||||
"pkname": null,
|
||||
"path": "/dev/mmcblk0",
|
||||
"fstype": null,
|
||||
"mountpoint": null,
|
||||
"size": 64088965120,
|
||||
"ro": false,
|
||||
"label": null
|
||||
},{
|
||||
"name": "mmcblk0p1",
|
||||
"pkname": "mmcblk0",
|
||||
"path": "/dev/mmcblk0p1",
|
||||
"fstype": "vfat",
|
||||
"mountpoint": null,
|
||||
"size": 100663296,
|
||||
"ro": false,
|
||||
"label": "COS_GRUB"
|
||||
},{
|
||||
"name": "mmcblk0p2",
|
||||
"pkname": "mmcblk0",
|
||||
"path": "/dev/mmcblk0p2",
|
||||
"fstype": "ext4",
|
||||
"mountpoint": "%s",
|
||||
"size": 6501171200,
|
||||
"ro": false,
|
||||
"label": "COS_STATE"
|
||||
},{
|
||||
"name": "mmcblk0p3",
|
||||
"pkname": "mmcblk0",
|
||||
"path": "/dev/mmcblk0p3",
|
||||
"fstype": "LVM2_member",
|
||||
"mountpoint": null,
|
||||
"size": 4471128064,
|
||||
"ro": false,
|
||||
"label": null
|
||||
},{
|
||||
"name": "mmcblk0p4",
|
||||
"pkname": "mmcblk0",
|
||||
"path": "/dev/mmcblk0p4",
|
||||
"fstype": "ext4",
|
||||
"mountpoint": "/usr/local",
|
||||
"size": 67108864,
|
||||
"ro": false,
|
||||
"label": "COS_PERSISTENT"
|
||||
},{
|
||||
"name": "KairosVG-oem",
|
||||
"pkname": "mmcblk0p3",
|
||||
"path": "/dev/mapper/KairosVG-oem",
|
||||
"fstype": "ext4",
|
||||
"mountpoint": "/oem",
|
||||
"size": 67108864,
|
||||
"ro": false,
|
||||
"label": "COS_OEM"
|
||||
},{
|
||||
"name": "KairosVG-recovery",
|
||||
"pkname": "mmcblk0p3",
|
||||
"path": "/dev/mapper/KairosVG-recovery",
|
||||
"fstype": "ext4",
|
||||
"mountpoint": null,
|
||||
"mountpoint": "%s",
|
||||
"size": 4399824896,
|
||||
"ro": false,
|
||||
"label": "COS_RECOVERY"
|
||||
}
|
||||
]
|
||||
}`, constants.RunningStateDir, constants.LiveDir))
|
||||
}
|
||||
|
Reference in New Issue
Block a user