mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-15 22:08:47 +00:00
qmp: Add ro argument for block-device hotplug funcs
We should allow users to specify if a block device should be hotplugged as read-only. Fixes: #157 Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
This commit is contained in:
@@ -408,7 +408,7 @@ func TestQMPBlockdevAdd(t *testing.T) {
|
||||
q := startQMPLoop(buf, cfg, connectedCh, disconnectedCh)
|
||||
q.version = checkVersion(t, connectedCh)
|
||||
err := q.ExecuteBlockdevAdd(context.Background(), "/dev/rbd0",
|
||||
fmt.Sprintf("drive_%s", volumeUUID))
|
||||
fmt.Sprintf("drive_%s", volumeUUID), false)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error %v", err)
|
||||
}
|
||||
@@ -432,7 +432,7 @@ func TestQMPBlockdevAddWithCache(t *testing.T) {
|
||||
q := startQMPLoop(buf, cfg, connectedCh, disconnectedCh)
|
||||
q.version = checkVersion(t, connectedCh)
|
||||
err := q.ExecuteBlockdevAddWithCache(context.Background(), "/dev/rbd0",
|
||||
fmt.Sprintf("drive_%s", volumeUUID), true, true)
|
||||
fmt.Sprintf("drive_%s", volumeUUID), true, true, false)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user